Commit Graph
76 Commits
Author SHA1 Message Date
Dick Porter 32ba645fab 2004-08-04 Dick Porter <[email protected]>
* Socket.cs: Update Connected state in Select and Poll; this is
	when we find out that non-blocking Connects succeed.  Fixes bug
	62398.

svn path=/trunk/mcs/; revision=31862
2004-08-04 12:41:49 +00:00
Dick Porter 07fbaf3262 2004-07-28 Dick Porter <[email protected]>
* Socket.cs: ReceiveFrom might not return a valid EndPoint.  Patch
	by Nick Vaughan ([email protected]), fixes bug 61608.

svn path=/trunk/mcs/; revision=31560
2004-07-28 15:44:10 +00:00
Dick Porter 2aba10408a 2004-07-15 Dick Porter <[email protected]>
* Socket.cs: Don't try and dereference a null array in Select()
	(possible if a descriptor list of length 0 was passed.)  Patch by
	Nick Vaughan ([email protected]), fixes bug 61595.

svn path=/trunk/mcs/; revision=31178
2004-07-15 13:52:18 +00:00
Gonzalo Paniagua Javier 0fffd32d9a 2004-07-12 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: if'ed RemoveReferences calls.

svn path=/trunk/mcs/; revision=31023
2004-07-12 01:37:25 +00:00
Dick Porter eef810c8ee 2004-07-09 Dick Porter <[email protected]>
* PeerCred.cs: Get the unix socket peer credentials.

2004-07-09  Dick Porter  <[email protected]>

	* Socket.cs: Slight tweak to allow unknown objects to be returned
	by GetSocketOption().

svn path=/trunk/mcs/; revision=30928
2004-07-09 13:04:11 +00:00
Gonzalo Paniagua Javier 004725da98 2004-06-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: connect on non-blocking sockets returns EINPROGRESS. Fixes
	bug #60811.

svn path=/trunk/mcs/; revision=30478
2004-06-28 15:06:02 +00:00
Gonzalo Paniagua Javier c5512254ac 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: wrong error code in connect and accept. EWOULDBLOCK is
	10035. Fixes bug #60563.

svn path=/trunk/mcs/; revision=30169
2004-06-23 09:38:50 +00:00
Duncan Mak 24f5ef2c44 Add MIT license to System.dll
svn path=/trunk/mcs/; revision=30054
2004-06-21 18:02:11 +00:00
Gonzalo Paniagua Javier acf93ff574 2004-06-20 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: fixed Accept for non-blocking sockets.

svn path=/trunk/mcs/; revision=29980
2004-06-20 19:00:11 +00:00
Gert Driesen c4ac3065d5 * LingerOption.cs: marked field private to fix API signature
* MulticastOption.cs: marked field private to fix API signature

svn path=/trunk/mcs/; revision=29260
2004-06-11 05:07:35 +00:00
Gonzalo Paniagua Javier 552b3e2465 2004-06-05 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: throw ArgumentNullException if all the list are null OR
	empty. Fixes bug #59632.

svn path=/trunk/mcs/; revision=28864
2004-06-05 14:08:42 +00:00
Patrik Torstensson ef50c1b2e1 2004-05-21 Patrik Torstensson <[email protected]>
* TcpListener.cs: Fixes a lot of the problems with remoting nunit tests.

	(AcceptTcpClient): Don't create TcpClient before a
	connection is accepted.

	(LocalEndPoint): Use Server LocalEndPoint if connected
	otherwise use endpoint from ctor.

	(Init): Save end point, not server endpoint. This did
	cause TcpListener to ignore port sent via constructor.

	(Pending): Fixed wait time (method should return directly)

	(Start): Moved Bind here instead of Init method; old method
	caused us to bind ports even if the listener was stopped.

	(Stop): Null server when stopping

svn path=/trunk/mcs/; revision=27837
2004-05-21 17:05:32 +00:00
Dick Porter 0937ade06a 2004-05-13 Dick Porter <[email protected]>
* UdpClient.cs:
	* TcpClient.cs: Public API fixes

svn path=/trunk/mcs/; revision=27286
2004-05-13 16:22:40 +00:00
Gonzalo Paniagua Javier 6b97495b1d 2004-05-07 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: fixed Connect for non-blocking sockets. Closes bug #58169.

svn path=/trunk/mcs/; revision=26887
2004-05-07 07:47:23 +00:00
Gonzalo Paniagua Javier 48b65204d4 2004-05-03 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: fix for BeginConnect and non-blocking sockets.

svn path=/trunk/mcs/; revision=26636
2004-05-03 20:10:59 +00:00
Lluis Sanchez 8450b5abbd * Socket.cs: Use assembly name const to load Mono.Posix.
svn path=/trunk/mcs/; revision=26627
2004-05-03 19:26:58 +00:00
Gonzalo Paniagua Javier 1b298ca6d1 2004-05-01 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: only enable socket AIO if MONO_ENABLE_SOCKET_AIO is there.
	I will remove this once THE bug is hunted.

svn path=/trunk/mcs/; revision=26507
2004-05-01 13:20:28 +00:00
Gonzalo Paniagua Javier 53beb817a2 2004-04-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: added support for unmanaged asynchronous IO. Speed up
	error checking.
	* UdpClient.cs: fixed Dispose so that it only closes the socket when
	called explicitly.

svn path=/trunk/mcs/; revision=26110
2004-04-28 03:45:16 +00:00
Gonzalo Paniagua Javier 5360b96f46 2004-04-24 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: added GetSupportsAsync and Poll_internal internal calls.
	Cleaned up Worker class: moved fields to SocketAsyncResult and use Poll
	when the socket is non-blocking before getting EWOULDBLOCK error.

svn path=/trunk/mcs/; revision=25914
2004-04-24 02:03:26 +00:00
Dick Porter 15f11aeb01 2004-04-08 Dick Porter <[email protected]>
* Socket.cs: Rearrange the internal calls so that the exceptions
	are thrown from managed code

svn path=/trunk/mcs/; revision=25217
2004-04-08 11:56:14 +00:00
Gonzalo Paniagua Javier 1c963cb88d 2004-03-21 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: when Dispose (bool) is called from the finalizer, always
	do the cleanup. Fixes yet another nullref with xsp.

svn path=/trunk/mcs/; revision=24387
2004-03-21 07:56:15 +00:00
Gonzalo Paniagua Javier 39535ef3fe 2004-02-19 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: implemented IOControl.

svn path=/trunk/mcs/; revision=23810
2004-03-08 19:05:59 +00:00
Gonzalo Paniagua Javier 8114803ec8 2004-02-18 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: use the threadpool for asynchronous calls instead of
	creating new threads.

svn path=/trunk/mcs/; revision=23229
2004-02-18 18:56:16 +00:00
Gonzalo Paniagua Javier 6e64eaf926 2004-02-12 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: added locks around waithandle assign and comparison in
	class Worker. Handle other exceptions than SocketException for
	non-blocking sockets.

svn path=/trunk/mcs/; revision=23005
2004-02-12 00:55:21 +00:00
Gonzalo Paniagua Javier c57d82fab4 don't create the ManualResetEvent in the constructor
svn path=/trunk/mcs/; revision=22471
2004-01-24 22:40:56 +00:00
Gonzalo Paniagua Javier 7389c6267d 2004-01-24 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: handle WSAEWOULDBLOCK for non-blocking sockets. Fixes
	bug #53168. Avoid the creation of the ManualResetEvent in class Worker
	whenever possible.

svn path=/trunk/mcs/; revision=22470
2004-01-24 22:13:28 +00:00
Gonzalo Paniagua Javier 8fc4e8ba06 2004-01-24 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: if we have a pending async event, delay socket closing
	until EndX is called. Fixes bug #53229. Check parameters and if the
	socket has been disposed. Implemented IDisposable explicitly. The
	threads created have IsBackground = true now.

svn path=/trunk/mcs/; revision=22464
2004-01-24 13:07:14 +00:00
Gonzalo Paniagua Javier 9f6185664b 2004-01-10 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: patch from Brad Fitzpatrick <[email protected]> take 2.

svn path=/trunk/mcs/; revision=21890
2004-01-10 00:02:57 +00:00
Gonzalo Paniagua Javier c5cd9cb597 2003-12-30 Gonzalo Paniagua Javier <[email protected]>
* System_test.dll.sources: added SocketTest.cs

	* System.Net.Sockets/Socket.cs: fix for several asynchronous methods to
	delay exception throwing.

	* Test/System.Net.Sockets/SocketTest.cs: new test for asynchronous
	connection failure.

	Test+fix by Brad FitzpatrickBrad Fitzpatrick <[email protected]>.

svn path=/trunk/mcs/; revision=21562
2003-12-31 13:18:45 +00:00
Gonzalo Paniagua Javier 4a2756e552 2003-12-18 Gonzalo Paniagua Javier <[email protected]>
* TcpListener.cs: get the LocalEndPoint from the socket after binding.
	Fixes bug #52329.

svn path=/trunk/mcs/; revision=21296
2003-12-18 02:44:19 +00:00
Miguel de Icaza 3e7713768a 2003-10-20 Miguel de Icaza <[email protected]>
* TcpClient.cs: Fix void Dispose (bool disposing) to follow the
	pattern.  It was shutting down the managed resources even in the
	finalizer case, it should only do that when called from
	IDisposable.Dipose.

svn path=/trunk/mcs/; revision=19238
2003-10-20 22:16:28 +00:00
Gonzalo Paniagua Javier 9d82d59bfd 2003-10-14 Gonzalo Paniagua Javier <[email protected]>
* System.dll.sources: added VCodeCompiler.cs by Jochen Wezel
	<[email protected]>.

	* Microsoft.VisualBasic/VBCodeCompiler.cs: New.
	* Microsoft.VisualBasic/VBCodeGenerator.cs:
	* Microsoft.VisualBasic/VBCodeProvider.cs: modified others to use the
	new CodeCompiler.

	* System.Net.Sockets/UdpClient.cs: removed Consoles.

svn path=/trunk/mcs/; revision=19033
2003-10-14 10:56:57 +00:00
Lluis Sanchez 9d82283043 * NetworkStream.cs: Added [In,Out] attributes to Read method.
svn path=/trunk/mcs/; revision=18043
2003-09-11 23:47:32 +00:00
Gonzalo Paniagua Javier cca8eba0de 2003-08-24 Gonzalo Paniagua Javier <[email protected]>
* TcpListener.cs: various fixes to make the new tests pass. Closes
	bug #47848.

svn path=/trunk/mcs/; revision=17548
2003-08-24 16:04:24 +00:00
Miguel de Icaza e8bca914b3 Close the client, if we dont create the stream
svn path=/trunk/mcs/; revision=17307
2003-08-13 15:35:02 +00:00
Miguel de Icaza 56a8c0cb34 2003-08-10 Miguel de Icaza <[email protected]>
* UdpClient.cs (Receive): Fix Bug 45633;  We should do a blocking
	call until a datagram is arrives from the remote host.  This
	removes the 512 "magic" buffer size when we did not have any data.

svn path=/trunk/mcs/; revision=17237
2003-08-10 23:19:48 +00:00
Gonzalo Paniagua Javier 2dede109a4 2003-07-31 Gonzalo Paniagua Javier <[email protected]>
* NetworkStream.cs:
	* Socket.cs: fixed array boundary checks. 0 sized arrays are allowed.

svn path=/trunk/mcs/; revision=16921
2003-07-31 02:07:21 +00:00
Andreas N ead329bfa3 2003-07-18 Andreas Nahr <[email protected]>
* Socket.cs: Added GetHashCode method

svn path=/trunk/mcs/; revision=16397
2003-07-18 11:35:47 +00:00
Jerome Laban 3d171d4a85 2003-07-14 Jerome Laban <[email protected]>
* Socket.cs:
        * ProtocolType.cs:
        * SocketOptionLevel.cs:
        * TcpListener.cs:
        * TcpClient.cs:
        * UdpClient.cs:

        Added IPv6 support.

        * IPv6MulticastOption.cs: Added for IPv6 support.

svn path=/trunk/mcs/; revision=16217
2003-07-14 16:03:20 +00:00
Dick Porter 88fba9d239 2003-05-16 Dick Porter <[email protected]>
* Socket.cs: Use Mono.Posix.UnixEndPoint if its available

svn path=/trunk/mcs/; revision=14627
2003-05-16 12:03:57 +00:00
Gonzalo Paniagua Javier 30f84fcee3 2003-05-11 Gonzalo Paniagua Javier <[email protected]>
* MulticastOption.cs: patch by Jerome Laban included in bug #42393.

svn path=/trunk/mcs/; revision=14469
2003-05-11 01:32:44 +00:00
Gonzalo Paniagua Javier 7b43a7b458 2003-05-05 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs:
        (Select): don't create arrays if not needed.
        (Poll): call Select_internal directly.

svn path=/trunk/mcs/; revision=14298
2003-05-05 13:36:06 +00:00
Gonzalo Paniagua Javier a6b28539ae 2003-03-25 Gonzalo Paniagua Javier <[email protected]>
* UdpClient.cs: don't bind the socket unless .ctor (IPEndPoint) is used.
	Added more checks and throws.
	Small fixes in Send to avoid duplicating the buffer.
	Moved CheckIfDisposed calls to the start of the methods instead of doing
	the check inside a finally clause.

svn path=/trunk/mcs/; revision=12798
2003-03-25 00:16:59 +00:00
Gonzalo Paniagua Javier c6b2a68290 2003-03-03 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs:
	(SendTo): fix from Jerome Laban <[email protected]>.

svn path=/trunk/mcs/; revision=12111
2003-03-03 00:12:24 +00:00
Gonzalo Paniagua Javier dcc8dfb3af 2003-02-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: patch from Elan Feingold <[email protected]>. Fixes
	NullReferenceException when the callback is null.

svn path=/trunk/mcs/; revision=12056
2003-02-28 08:00:46 +00:00
Gonzalo Paniagua Javier 45a8d661be 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
* NetworkStream.cs: allow 0 size array in Write.

svn path=/trunk/mcs/; revision=11648
2003-02-17 20:23:26 +00:00
Gonzalo Paniagua Javier 58ac3c61d1 2003-02-16 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: make Worker.Connect and Receive work with non-blocking
	sockets. May be Receive* and Send* in Worker need to do the same. I'll
	wait for bug reports. Set IsCompleted to true before invoking the end
	callback. Fixes bug #38136.

svn path=/trunk/mcs/; revision=11629
2003-02-16 22:13:26 +00:00
Gonzalo Paniagua Javier e796ecc0a2 2003-01-23 Gonzalo Paniagua Javier <[email protected]>
* System/System.Net.Sockets/NetworkStream.cs: the check for disposed
	should not be done in the finally clause.

	* corlib/System.IO/BufferedStream.cs: don't try to write a 0 sized
	array on when flushing the stream.

	Fixes bug #37045.

svn path=/trunk/mcs/; revision=10825
2003-01-23 05:30:47 +00:00
Gonzalo Paniagua Javier 838b6c5e41 2003-01-04 Gonzalo Paniagua Javier <[email protected]>
* UdpClient.cs: fixed bug #36226.

svn path=/trunk/mcs/; revision=10135
2003-01-04 16:51:17 +00:00
Dick Porter 243a8ee50a 2002-11-13 Dick Porter <[email protected]>
* Socket.cs: Only close the socket in one place, ie the Dispose
	method.  Fixes bug 32054.

svn path=/trunk/mcs/; revision=8969
2002-11-13 16:28:01 +00:00