Commit Graph
112 Commits
Author SHA1 Message Date
Gonzalo Paniagua Javier 10badb611a 2009-02-17 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: instead of clearing the sockets form the output and then
	adding them back, we just remove the ones that have not been signaled.
	Fixes bug #354090 and bug #476138.


svn path=/trunk/mcs/; revision=127234
2009-02-18 00:35:48 +00:00
Gonzalo Paniagua Javier 8b0ce39175 reverting this patch until it works with bug 354090 and 476138
svn path=/trunk/mcs/; revision=127104
2009-02-17 07:30:29 +00:00
Gonzalo Paniagua Javier 3ab9dba94e 2009-02-11 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: instead of clearing the sockets form the output and then
	adding them back, we just remove the ones that have not been
	signaled.
	Fixes bug #354090.


svn path=/trunk/mcs/; revision=126637
2009-02-11 19:47:29 +00:00
Gonzalo Paniagua Javier 2be8842ab4 2009-01-19 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: don't throw when there's no ipv6 configuration.


svn path=/trunk/mcs/; revision=123832
2009-01-19 22:25:29 +00:00
Dick Porter 5e0ae0a305 2009-01-09 Dick Porter <[email protected]>
* Socket.cs: Special case 0-length receive requests in the
	BeginAccept overloads that wait for data, so they behave as the
	non-waiting version.  Seems to match MS behaviour, fixes bug
	464201.



svn path=/trunk/mcs/; revision=122904
2009-01-09 15:18:50 +00:00
Bill Holmes b5dde2bbdc 2008-12-30 Bill Holmes <[email protected]>
* socket-io.h : Changing the signature of
	  ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
	  the blocking state.

	* icall-def.h :  Changing the signature of
	  System.Net.Sockets.Socket.Accept_internal to pass the blocking state.

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
	  For Windows only.  Avoid blocking when calling accept by
	  querying for a connection via select.  The loop also queries
	  the thread state every 1000 micro seconds for the thread
	  stop state.  This will avoid the process hanging on shutdown
	  when using a TcpChannel that is never connected to.

	* Socket.cs (Accept_internal) :  Changing the signature to pass
	  the blocking state.
	  
	Code is contributed under MIT/X11 license.


svn path=/trunk/mcs/; revision=122252
2008-12-30 16:58:15 +00:00
Gonzalo Paniagua Javier 09dd5ff790 2008-12-20 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: add a new ReceiveFrom_nocheck that does not throw an
	exception in case of error.


svn path=/trunk/mcs/; revision=121923
2008-12-20 10:52:59 +00:00
Gonzalo Paniagua Javier b12fef3814 2008-12-20 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: if Blocking is set, translate a WouldBlock into a
	TimedOut.


svn path=/trunk/mcs/; revision=121922
2008-12-20 10:04:01 +00:00
Gonzalo Paniagua Javier c25ee5d95b 2008-11-12 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: mark the socket as not connected when there is a pending
	error or exception about to be thrown.
	Bug #443346 fixed.


svn path=/trunk/mcs/; revision=118696
2008-11-13 03:47:23 +00:00
Bill Holmes 017eaee375 2008-09-10 Bill Holmes <[email protected]>
* Socket.cs : Adding a comment to provide locations where
	  changes to MonoSocketAsyncResult need to be synced.

	* Process.cs : Update the fields of ProcessAsyncReader to
	  match MonoSocketAsyncResult metadata/socket-io.h

	Code is contributed under MIT/X11 license.


svn path=/trunk/mcs/; revision=112681
2008-09-10 15:20:35 +00:00
Atsushi Eno 582b946eb0 2008-09-06 Atsushi Enomoto <[email protected]>
* Socket.cs : (SocketAsyncResult) release byte buffer early so that
	  it does not have to store extra data in pool. Fixed bug #397627.


svn path=/trunk/mcs/; revision=112408
2008-09-05 23:53:42 +00:00
Jb Evain d124c0ef4d ifdef out ResetAbort for SL2
svn path=/trunk/mcs/; revision=109659
2008-08-05 10:45:16 +00:00
Jb Evain e0e4361e63 cleanup System.ComponentModel for SL2
svn path=/trunk/mcs/; revision=109344
2008-07-31 13:49:49 +00:00
Dick Porter d99d4af2ff 2008-06-19 Dick Porter <[email protected]>
* Socket.cs: Implement generic Send() and Receive() methods.
	Fixes bug 395168.

2008-06-19  Dick Porter  <[email protected]>

	* SocketTest.cs: Tests for generic Send() and Receive() methods.



svn path=/trunk/mcs/; revision=106198
2008-06-19 11:50:42 +00:00
Stephane Delcroix 49ee8b5d33 2008-06-12 Stephane Delcroix <[email protected]>
* Socket.cs: minimal changes to run in the 2.1 profile

svn path=/trunk/mcs/; revision=105690
2008-06-12 12:17:50 +00:00
Marek Habersack a0fc121d39 2008-05-09 Marek Habersack <[email protected]>
* SocketAsyncEventArgs.cs: implemented support for executing
	asynchronous socket actions, called from the new xxxxAsync methods
	in Socket. The asynchronous operations do not use the ThreadPool
	as I can't get the sample applications to work (send/receive
	callbacks don't work) - it may change in the future.

	* Socket.cs: implemented several xxxxAsync 2.0sp1 methods. The
	ones not implemented for now are: ReceiveMessageFromAsync and
	SendPacketsAsync. AcceptAsync doesn't perform the check for the
	buffer size for now - need to implement runtime support for that.
	Made several methods internal, so that they can be accessed from
	SocketAsyncEventArgs code.

svn path=/trunk/mcs/; revision=102884
2008-05-09 20:11:09 +00:00
Jb Evain 99139ecdc2 compile System.Net after last changes
svn path=/branches/jb/ml2/mcs/; revision=99298
2008-03-29 17:39:56 +00:00
Paolo Molaro 59aa1a7ad2 Wed Mar 12 20:06:07 CET 2008 Paolo Molaro <[email protected]>
* Socket.cs: add a static ctor so that ipv4Supported and ipv6Supported
	are initialized (they are used by the runtime).


svn path=/trunk/mcs/; revision=98073
2008-03-12 18:18:37 +00:00
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