Commit Graph

79 Commits

Author SHA1 Message Date
paulc c4c9e994f0 Renamed DebugGoOn to DebugCrit so it better matches its purpose.
Swapped order of DebugCall and DebugNote so DebugCall is less visible.
Changed default debug level to DebugNote.
Modified a few inadequate uses of DebugCrit.


git-svn-id: http://yate.null.ro/svn/yate/trunk@6250 acf43c95-373e-0410-b603-e72c3f656dc1
2017-08-01 13:08:23 +00:00
paulc 6f3f09ddbe Added support for specifying the mode to mkdir.
git-svn-id: http://yate.null.ro/svn/yate/trunk@6061 acf43c95-373e-0410-b603-e72c3f656dc1
2015-11-11 17:58:05 +00:00
paulc 6f44645eab Added method to retrieve the TOS/DSCP of a Socket.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5977 acf43c95-373e-0410-b603-e72c3f656dc1
2015-06-03 14:18:07 +00:00
paulc 7f834fd8b8 Added engine and Javascript methods for packing and unpacking IP addresses.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5929 acf43c95-373e-0410-b603-e72c3f656dc1
2014-12-18 15:11:42 +00:00
paulc cef24d27f8 Make sure an ip.v4.addr.ess:port does not get enclosed in square brackets.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5914 acf43c95-373e-0410-b603-e72c3f656dc1
2014-09-18 13:29:42 +00:00
paulc ad8e1fa56c Added Resolver support for A, AAAA and TXT records.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5874 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-22 11:03:38 +00:00
paulc 37a72e4bc1 Added copyright notices to sources and scripts missing them.
Updated copyright notices for 2014.
Fixed end of lines in many files.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5755 acf43c95-373e-0410-b603-e72c3f656dc1
2014-02-05 11:42:17 +00:00
paulc e266092edd Properly set DSCP on IPv6 sockets.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5660 acf43c95-373e-0410-b603-e72c3f656dc1
2013-10-06 18:27:48 +00:00
paulc 7711fef5b7 Added support in Socket and RTP module for setting IP QoS by DSCP keywords.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5659 acf43c95-373e-0410-b603-e72c3f656dc1
2013-10-03 16:18:41 +00:00
marian ac29008a7b Added methods used to fill a binary IP address buffer from stringified address.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5657 acf43c95-373e-0410-b603-e72c3f656dc1
2013-10-01 13:15:30 +00:00
marian e27a590ebb Added IPv6 support to SocketAddr and Socket classes.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5656 acf43c95-373e-0410-b603-e72c3f656dc1
2013-09-30 13:15:59 +00:00
paulc cf5d0fd71a Changed license terms in each source file to reference an external file.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5609 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-06 13:38:10 +00:00
paulc 863247ff31 Send Alarm from several places instead of just Debug.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5563 acf43c95-373e-0410-b603-e72c3f656dc1
2013-07-05 12:49:44 +00:00
marian b598f5596d Fixed async connect error check.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5493 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-26 07:51:46 +00:00
marian 7e2d02111f Added methos used to connect a socket asynchronously.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5489 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-25 14:19:31 +00:00
paulc 3b49b78ecb Added a shared static list of Atom strings and an YATOM macro.
This speeds up signifficantly the Yate RTTI on compilers that HAVE_BLOCK_RETURN.
Made the String comparison operator inline to shave off a few cycles.
Fast handle the comparison in identity case.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5449 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 13:19:14 +00:00
oana 083eecfcab Try to get socket address length from sa_len field when it is present.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5219 acf43c95-373e-0410-b603-e72c3f656dc1
2012-08-07 15:22:56 +00:00
oana a9672028df Detect the presence of the sa_len field of struct sockaddr and set it if that is the case. Fixes the comparison of SocketAddr objects on Mac OS X and BSD-based systems.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5218 acf43c95-373e-0410-b603-e72c3f656dc1
2012-08-07 12:08:16 +00:00
paulc 8dc6c1200c Add the O_LARGEFILE flag to handles opened by the File class.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5046 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-07 16:01:02 +00:00
paulc fa0269ba4f New YSTRING macro that creates an ad-hoc static const String to speed up comparations and conversions from literal strings.
On unsupported compilers the literal string is returned unchanged.


git-svn-id: http://yate.null.ro/svn/yate/trunk@4423 acf43c95-373e-0410-b603-e72c3f656dc1
2011-06-03 12:26:53 +00:00
marian 9db71618c3 Reset errno when starting to list directory content to make sure we don't inherit a previous failure.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4247 acf43c95-373e-0410-b603-e72c3f656dc1
2011-03-31 12:10:16 +00:00
marian 5f0adc7c0e Added method used to check if a non blocking operation is in progress. Added method used to update the socket error when a non blocking operation completed.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4148 acf43c95-373e-0410-b603-e72c3f656dc1
2011-03-02 14:29:05 +00:00
paulc fd39111d4f Added static method to check at runtime if Socket::select() is efficient.
Use select() on the MGCP reader socket if it worths.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3798 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-05 16:08:11 +00:00
paulc 82ad37c3af Detect if available and use poll() instead of select() on sockets.
This save a lot on performance by not FD_ZEROing large sets.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3797 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-05 15:06:57 +00:00
paulc eb82c7d2ac Optimized SocketAddr::assign to avoid assigning same address.
Saves many malloc+free+sprintf calls especially in RTP streams.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3712 acf43c95-373e-0410-b603-e72c3f656dc1
2010-10-12 15:39:04 +00:00
paulc d95cb2fec6 Spelling cleanup of a very common error: Retrive -> Retrieve
git-svn-id: http://yate.null.ro/svn/yate/trunk@3371 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-11 11:25:10 +00:00
andrei e85bb9b262 Added suport for abstract SCTP Socket
git-svn-id: http://yate.null.ro/svn/yate/trunk@3057 acf43c95-373e-0410-b603-e72c3f656dc1
2010-02-02 14:21:02 +00:00
paulc 749f559c9c Made more Socket methods virtual to allow implementing non kernel-based sockets.
Removed SCTP specific methods, they will go in a separate class.


git-svn-id: http://yate.null.ro/svn/yate/trunk@2984 acf43c95-373e-0410-b603-e72c3f656dc1
2009-12-14 16:37:08 +00:00
paulc 639f1bcedd Fixed a bug introduced in Rev. 2935 - in Windows HANDLE and SOCKET are different.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2941 acf43c95-373e-0410-b603-e72c3f656dc1
2009-11-13 10:44:28 +00:00
paulc c464d42a67 Fixed a bug causing incorrect result and potential crashes if a socket was terminated while in select().
git-svn-id: http://yate.null.ro/svn/yate/trunk@2935 acf43c95-373e-0410-b603-e72c3f656dc1
2009-11-12 14:49:18 +00:00
paulc 435cb3ab9c Extended gethostbyname_r buffer to 576 bytes for more demanding versions of libc.
Use single threaded gethostbyname as fallback if buffer is still too small.


git-svn-id: http://yate.null.ro/svn/yate/trunk@2860 acf43c95-373e-0410-b603-e72c3f656dc1
2009-10-02 13:09:02 +00:00
paulc d98cc424eb Use inet_ntop, inet_pton and gethostbyname_r if available on system.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2859 acf43c95-373e-0410-b603-e72c3f656dc1
2009-10-02 10:00:23 +00:00
paulc 935d62a35d Fixed Socket::canRetry() on Windows.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2778 acf43c95-373e-0410-b603-e72c3f656dc1
2009-08-03 10:26:02 +00:00
paulc c23251c4d0 Fixed more warnings on different platforms.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2726 acf43c95-373e-0410-b603-e72c3f656dc1
2009-06-19 11:58:33 +00:00
paulc 65fa4adbd4 Fixed warnings and a few minor bugs when compiling on a different architecture.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2724 acf43c95-373e-0410-b603-e72c3f656dc1
2009-06-19 11:19:20 +00:00
paulc a68b1553c0 Changed the name of the mutex protecting name resolution to reveal its real usage.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2711 acf43c95-373e-0410-b603-e72c3f656dc1
2009-06-15 04:10:36 +00:00
paulc 6dfcdcbd11 Fixed several warnings detected by stricter compilers.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2679 acf43c95-373e-0410-b603-e72c3f656dc1
2009-06-01 20:05:02 +00:00
paulc 85da36395b Added names to the Mutex class to ease debugging of deadlocks.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2611 acf43c95-373e-0410-b603-e72c3f656dc1
2009-05-05 12:25:31 +00:00
marian 045895ebdc Added remove directory method to File.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2608 acf43c95-373e-0410-b603-e72c3f656dc1
2009-05-01 14:42:12 +00:00
paulc 73dd0b02f1 Added parameters to make a newly created file public readable or writable.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2583 acf43c95-373e-0410-b603-e72c3f656dc1
2009-04-15 13:55:44 +00:00
marian a5c7c43846 Allow a file to be shared when opened read only. Return success when reading past the end of file.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2541 acf43c95-373e-0410-b603-e72c3f656dc1
2009-03-25 17:35:08 +00:00
paulc bd956e7bf3 Added MemoryStream class that provides basic I/O to an internal DataBlock.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2529 acf43c95-373e-0410-b603-e72c3f656dc1
2009-03-22 20:34:33 +00:00
marian fdf919acbe Added static method to File used to list directory content.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2517 acf43c95-373e-0410-b603-e72c3f656dc1
2009-03-06 17:20:09 +00:00
paulc d46d577cbd Moved length() and seek() methods to the Stream class so seekable streams can be implemented.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2513 acf43c95-373e-0410-b603-e72c3f656dc1
2009-03-05 13:10:31 +00:00
marian c80ee5b9ad Changed file truncate conditions (truncate a file only if not opened for read).
git-svn-id: http://yate.null.ro/svn/yate/trunk@2512 acf43c95-373e-0410-b603-e72c3f656dc1
2009-03-05 12:53:01 +00:00
paulc b3fdaf8fcb Truncate a file that is opened writable and non-appending.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2500 acf43c95-373e-0410-b603-e72c3f656dc1
2009-02-27 17:15:32 +00:00
marian 31350b4fbe Added File manipulation methods. Added Time conversion methods. Thread last error string can now be obtained from the system.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2416 acf43c95-373e-0410-b603-e72c3f656dc1
2009-01-09 14:30:05 +00:00
paulc 95e005df49 Operations on an invalid socket cannot be retried.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2311 acf43c95-373e-0410-b603-e72c3f656dc1
2008-11-09 23:42:27 +00:00
paulc d9bf89c7d3 Make files written by Yate non-executable.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2207 acf43c95-373e-0410-b603-e72c3f656dc1
2008-09-17 17:08:27 +00:00
paulc fbd1c99baf Added method to check if a socket handle is valid for select()ing it.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2057 acf43c95-373e-0410-b603-e72c3f656dc1
2008-07-10 17:47:49 +00:00