Commit Graph
94 Commits
Author SHA1 Message Date
Miguel de Icaza d9fe0856e8 2007-11-01 Miguel de Icaza <[email protected]>
* Socket.cs: Do not set the Send and Receive buffer sizes for the
	socket to the defaults set on Windows, they kill our performance.

	Thanks to Zoltan Varga for tracking the performance issue down.
	The bug was #325032

svn path=/trunk/mcs/; revision=88700
2007-11-01 23:45:24 +00:00
Robert Jordan 30ca8e180b In System.Net.Sockets:
2007-10-21  Robert Jordan  <[email protected]>

	* Socket.cs: Remove GetHashCode override from the NET_2_0
	profile. Add LAMESPEC comment. Fixes bug #325113.

In Test/System.Net.Sockets:
2007-10-21  Robert Jordan  <[email protected]>

	* SocketTest.cs: Enable GetHashCodeTest.


svn path=/trunk/mcs/; revision=87865
2007-10-21 11:59:00 +00:00
Miguel de Icaza 3de7ce185d remove warnings
svn path=/trunk/mcs/; revision=86642
2007-09-29 19:10:22 +00:00
Gert Driesen d1010873e3 * Socket.cs: Removed unused method.
svn path=/trunk/mcs/; revision=86217
2007-09-22 16:49:17 +00:00
Dick Porter 4ca63a4b2a 2007-08-02 Dick Porter <[email protected]>
* Socket.cs: Patch from Brian Nickel ([email protected]) to
	improve EndPoint handling.



svn path=/trunk/mcs/; revision=83276
2007-08-02 12:26:56 +00:00
Gert Driesen a3ded8795b * Socket.cs: Code formatting. Marked not implemented methods as TODO.
Removed extra spaces.

svn path=/trunk/mcs/; revision=81606
2007-07-08 18:54:13 +00:00
Dick Porter 0d715e735d 2007-07-04 Dick Porter <[email protected]>
* Socket.cs: Don't set DontFragment by default for IPv6 sockets.
	Fixes bug 81985.



svn path=/trunk/mcs/; revision=81344
2007-07-04 16:20:26 +00:00
Dick Porter dfef4f8112 2007-01-26 Dick Porter <[email protected]>
* Socket.cs: SupportsIPv6 is obsolete in the 2.0 profile.  Stub
	out BeginReceiveMessageFrom(), BeginSendFile(),
	EndReceiveMessageFrom(), EndSendFile(), ReceiveMessageFrom(), and
	SendFile().

	* IPPacketInformation.cs: New in the 2.0 profile

	* SocketFlags.cs: Remove useless (and empty) inline documentation,
	and add 2.0 items.

	* TcpListener.cs: Mark Server as public in the 2.0 profile.

	* UdpClient.cs: Mark Dispose(bool) as protected in the 2.0
	profile.

	System.Net.Sockets should now be 2.0-complete.



svn path=/trunk/mcs/; revision=71759
2007-01-26 17:57:31 +00:00
Dick Porter 75ed1e07ec 2007-01-26 Dick Porter <[email protected]>
* Socket.cs: There's no point checking the SO_ERROR status of a
	socket after poll() or select() if we already know that connected
	== true.

2007-01-26  Dick Porter  <[email protected]>

	* SocketTest.cs: New test for SO_ERROR reading, returning the same
	value over and over.



svn path=/trunk/mcs/; revision=71751
2007-01-26 14:27:47 +00:00
Miguel de Icaza dd87eabb55 2007-01-22 Miguel de Icaza <[email protected]>
* Socket.cs: Move the throw new NotImplementedException ()
	elsewhere to prevent Moma reports.

svn path=/trunk/mcs/; revision=71458
2007-01-22 20:18:23 +00:00
Dick Porter 97d4f4d07e 2007-01-20 Dick Porter <[email protected]>
* Socket.cs(SocketDefaults): Catch and ignore any SocketExceptions
	thrown from setting default socket options - some platforms might
	not support a particular default we're trying to set.



svn path=/trunk/mcs/; revision=71386
2007-01-20 10:06:54 +00:00
Dick Porter 556648b407 2007-01-11 Dick Porter <[email protected]>
* System.dll.sources: Add System.Net.Sockets/{IOControlCode,SocketInformation,SocketInformationOptions,TransmitFileOptions}.cs

2007-01-11  Dick Porter  <[email protected]>

	* Win32Exception.cs: Add error 50 (ERROR_NOT_SUPPORTED)

2007-01-11  Dick Porter  <[email protected]>

	* IOControlCode.cs: 
	* SocketInformation.cs: 
	* Socket.cs: 
	* UdpClient.cs: 2.0 profile updates, loosely based on a patch by
	Sridhar Kulkarni.

	* SocketInformationOptions.cs: 
	* TransmitFileOptions.cs: Implemented by Sridhar Kulkarni
	([email protected])



svn path=/trunk/mcs/; revision=70853
2007-01-11 13:30:28 +00:00
Miguel de Icaza 40d14c161e To improve Moma Reports
svn path=/trunk/mcs/; revision=70150
2006-12-28 01:03:29 +00:00
Paolo Molaro bc7743b539 Wed Dec 13 12:04:02 CET 2006 Paolo Molaro <[email protected]>
* Socket.cs: stub ReceiveBufferSize and SendBufferSize to
	get ironpython to compile.


svn path=/trunk/mcs/; revision=69442
2006-12-13 11:04:59 +00:00
Miguel de Icaza c83abd9c82 Remove MonoTODOs that should not be there
svn path=/trunk/mcs/; revision=68539
2006-11-27 23:05:00 +00:00
Dick Porter 32156051a8 2006-11-23 Dick Porter <[email protected]>
* Socket.cs: Only set Connected = true in Poll() and Select() if
        the socket error status is 0.  Fixes bug 79878.



svn path=/trunk/mcs/; revision=68399
2006-11-23 16:01:44 +00:00
Andrew Skiba fd9460c869 TARGET_JVM
svn path=/trunk/mcs/; revision=66038
2006-09-28 14:36:43 +00:00
Gonzalo Paniagua Javier 8a03479116 2006-09-11 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: update the SocketOperation enum.


svn path=/trunk/mcs/; revision=65247
2006-09-11 17:48:18 +00:00
Gonzalo Paniagua Javier f473ef5d59 2006-08-16 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: replace hardcoded error numbers with the SocketError
	values. When ReceiveTimeout is set on a blocking socket, correctly
	report timeouts in the generated exception.
	
	* SocketException.cs: add new internal ctor (int, string).


svn path=/trunk/mcs/; revision=63802
2006-08-16 10:33:15 +00:00
Miguel de Icaza 997998b637 2006-08-12 Miguel de Icaza <[email protected]>
* Socket.cs (NoDelay): Implement.

svn path=/trunk/mcs/; revision=63686
2006-08-13 20:27:54 +00:00
Gonzalo Paniagua Javier 4f71124870 warnings
svn path=/trunk/mcs/; revision=63624
2006-08-10 20:37:09 +00:00
Gonzalo Paniagua Javier c2bf44ca7e 2006-06-30 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: patch from Sanghyeon Seo that implements
	(Send|Receive)Timeout for 2.0.
	* MulticastOption.cs: more 2.0 stuff.


svn path=/trunk/mcs/; revision=62157
2006-06-30 15:40:56 +00:00
Atsushi Eno a421054973 2006-06-28 Atsushi Enomoto <[email protected]>
* Socket.cs : use ConfigurationManager.GetSection() under NET_2_0.
	  Also make sure to avoid NRE.


svn path=/trunk/mcs/; revision=62117
2006-06-28 16:05:20 +00:00
Zoltan Varga 7d658ec48d 2006-06-24 Zoltan Varga <[email protected]>
* Socket.cs: Add stubs for net 2.0 SendTimeout and ReceiveTimeout properties.

svn path=/trunk/mcs/; revision=62020
2006-06-24 17:56:25 +00:00
Gonzalo Paniagua Javier 13a69f6635 2006-04-10 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs:
	* SocketError.cs: implemented Reseive/Send overloads that do not throw
	in case of error. Patch by Tomi Valkeinen.


svn path=/trunk/mcs/; revision=59333
2006-04-10 22:49:59 +00:00
Gonzalo Paniagua Javier dc22e47aac 2006-03-09 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: pass something not empty to the unixep ctor.


svn path=/trunk/mcs/; revision=57757
2006-03-09 23:43:53 +00:00
Gonzalo Paniagua Javier 1a294c0d39 2006-02-03 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: added a missing overload for SetSocketOption.


svn path=/trunk/mcs/; revision=56554
2006-02-03 23:41:33 +00:00
Gonzalo Paniagua Javier 73cb750b0d 2006-01-19 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: use the 2.0 configuration classes when checking for IPv6
	support.


svn path=/trunk/mcs/; revision=55806
2006-01-20 01:17:30 +00:00
Dick Porter 810ca6f865 2005-10-11 Dick Porter <[email protected]>
* Socket.cs: Don't call connect(2) twice for non-blocking sockets,
        it breaks on macos (and probably other bsd-based stacks too,) use
        poll() and getsockopt() to check if it worked.



svn path=/trunk/mcs/; revision=51565
2005-10-11 13:20:59 +00:00
Gonzalo Paniagua Javier a336835b68 2005-09-27 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: add checks for 'disposed' all over. Fixes bug #76429.


svn path=/trunk/mcs/; revision=50890
2005-09-27 21:10:24 +00:00
Gonzalo Paniagua Javier 247898cc61 2005-06-04 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: disallow connecting to .Any addresses. Fixes bug #75154.


svn path=/trunk/mcs/; revision=45409
2005-06-04 18:08:19 +00:00
Gonzalo Paniagua Javier e485c1a07d 2005-06-01 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: adapted Select to the new Select_internal that uses poll()
	instead of select(). Managed part of the fix for bug #71203.


svn path=/trunk/mcs/; revision=45298
2005-06-01 14:10:13 +00:00
Gonzalo Paniagua Javier c24f3607eb 2005-05-23 Gonzalo Paniagua Javier <[email protected]>
* System.Net/WebConnection.cs: prevent 2 nullrefs when the aborting
	during Connect() and reset the status to Success before starting a
	new request.

	* System.Net.Sockets/Socket.cs: apply the same hack on blocking Connect
	calls as the one used in Accept.

	Fixes bug #75025.


svn path=/trunk/mcs/; revision=44919
2005-05-23 21:26:23 +00:00
Gonzalo Paniagua Javier 5c63430c91 2005-05-07 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: see bug #74842, which is fixed with this patch for details
	and test cases on the blocking behavior of accept() when close() is
	called from another thread. The solution applied is to Abort the thread
	that is blocking in Accept_internal() when someone calls Close (), then
	reset the abort state if the socket is disposed and return the same
	error as MS (10004 - interrupted).


svn path=/trunk/mcs/; revision=44192
2005-05-07 06:22:46 +00:00
Gonzalo Paniagua Javier 1df98cfd88 2005-05-06 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: match MS behavior on SetSocketOption with a boolean
	argument. MS 1.1 throws an ArgumentException, but 2.0 turns true/false
	into 1/0 and works fine. Fixes bug #71753. Added checks for disposed
	in the 3 SetSocketOption.


svn path=/trunk/mcs/; revision=44160
2005-05-06 19:21:02 +00:00
Gonzalo Paniagua Javier 7b7756f790 2005-05-03 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: if there are outstanding aio requests and one of them gets
	an ObjectDisposedException, throw the same exception for the rest.


svn path=/trunk/mcs/; revision=43917
2005-05-03 09:54:10 +00:00
Gonzalo Paniagua Javier d2d4d13873 2005-05-02 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: removed hack added to fix bug #53229 (more than a year ago)
	that kept sockets opened until all AIO operations where finished. If
	the socket is closed, Receive returns 0 in EndReceive, the rest throw
	the ObjectDisposedException. Set the socket handle to -1 when closing.


svn path=/trunk/mcs/; revision=43865
2005-05-02 06:58:59 +00:00
Gonzalo Paniagua Javier 1d9c9e2441 Fix warnings
svn path=/trunk/mcs/; revision=43368
2005-04-21 00:47:25 +00:00
Gonzalo Paniagua Javier ba2691b27b 2005-04-18 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: Begin/End Send/SendTo guarantee that all bytes are written
	or an exception is thrown. Fixes bug #74475.


svn path=/trunk/mcs/; revision=43235
2005-04-19 03:14:02 +00:00
Gonzalo Paniagua Javier 2825b31aee for (int i = 0; i < 100; i++) Console.WriteLine ("I will remove Console.WriteLines before every commit.");
svn path=/trunk/mcs/; revision=43193
2005-04-18 06:08:42 +00:00
Gonzalo Paniagua Javier 377d5a9c87 2005-04-17 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: no need for locking in Worker. The actual read / write for
	Receive / Send is performed in the runtime time.



svn path=/trunk/mcs/; revision=43180
2005-04-18 02:38:44 +00:00
Gonzalo Paniagua Javier 01bf332567 2005-04-15 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: added a 'blocking' field that is passed to the runtime.


svn path=/trunk/mcs/; revision=43086
2005-04-15 23:50:42 +00:00
Gonzalo Paniagua Javier 3952eaad10 2005-04-09 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: invoke the callback after scheduling the next request for
	the socket. Fixes bug #74539.


svn path=/trunk/mcs/; revision=42746
2005-04-09 20:45:29 +00:00
Gonzalo Paniagua Javier 62f1abb1fb 2005-04-08 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: update socket connected status in an async request finishes
	synchronously. Use 'callback' instead of 'real_callback' field, which is
	now unused.


svn path=/trunk/mcs/; revision=42715
2005-04-08 22:38:56 +00:00
Gonzalo Paniagua Javier f9f02fa379 2005-04-07 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: added SocketOperation enum and 2 new fields to
	SocketAsyncResult that are used by the runtime. Asynchronous read/write
	are serialized so that only 1 of each kind is really 'active'.
	Handle non-blocking connects in BeginConnect instead of doing 2 Poll()
	in the threadpool.

	* NetworkStream.cs: better message for the exception.


svn path=/trunk/mcs/; revision=42661
2005-04-07 22:26:55 +00:00
Gonzalo Paniagua Javier 3a3ec5485d 2005-04-04 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: remove unused async IO code.


svn path=/trunk/mcs/; revision=42499
2005-04-04 03:45:57 +00:00
Gonzalo Paniagua Javier 01b2301d13 2005-03-01 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: don't Poll/block in Connect aither.


svn path=/trunk/mcs/; revision=41340
2005-03-01 22:51:32 +00:00
Gonzalo Paniagua Javier d44820458b 2005-02-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: don't block on Accept if the socket is non-blocking.
	Fixes bug #73053. Patch by Ankit Jain.


svn path=/trunk/mcs/; revision=41303
2005-03-01 01:21:10 +00:00
Gonzalo Paniagua Javier ae081c16da 2004-12-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: for Receive*/Send*, don't set the connected status to false
	when the error is EINPROGRESS or EWOULDBLOCK.


svn path=/trunk/mcs/; revision=38128
2004-12-28 12:08:47 +00:00
Dick Porter a305098f0f 2004-10-14 Dick Porter <[email protected]>
* Socket.cs (Sockets ): Set Accept()ed socket blocking status to
	be the same as the listening socket.  This follows MS behaviour.

svn path=/trunk/mcs/; revision=34989
2004-10-14 12:14:25 +00:00