Commit Graph
184 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
Gonzalo Paniagua Javier 42f4d6e1d2 2009-01-06 Gonzalo Paniagua Javier <[email protected]>
* TcpClient.cs: use IPv6Any when the family is IPv6.
	Bug #462688 fixed.


svn path=/trunk/mcs/; revision=122598
2009-01-07 01:17:08 +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
Miguel de Icaza 67c2ea5d54 Some API updates
svn path=/trunk/mcs/; revision=121931
2008-12-20 18:57:23 +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 40ffe194c8 2008-12-03 Gonzalo Paniagua Javier <[email protected]>
* UdpClient.cs: don't Poll() in Receive(), the call to ReceiveFrom
	will block anyway. Fixes bug #455894.


svn path=/trunk/mcs/; revision=120601
2008-12-03 15:33:16 +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 289f7e79e0 move SocketException_2_1 to System.Net hopefully fix the build
svn path=/trunk/mcs/; revision=109363
2008-07-31 17:09:15 +00:00
Jb Evain e0e4361e63 cleanup System.ComponentModel for SL2
svn path=/trunk/mcs/; revision=109344
2008-07-31 13:49:49 +00:00
Marek Safar bdd9de656e Fixed few warnings
svn path=/trunk/mcs/; revision=107455
2008-07-08 10:34:18 +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
Stephane Delcroix 84536647a0 2008-06-11 Stephane Delcroix <[email protected]>
* SocketAsyncEventArgs.cs: catch SocketException in ConnectAsync
	and set the SocketError accordingly.

svn path=/trunk/mcs/; revision=105581
2008-06-11 14:07:18 +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
Marek Habersack 072bdcccd6 2008-05-08 Marek Habersack <[email protected]>
* SocketAsyncOperation.cs, SendPacketsElement.cs,
	SocketAsyncEventArgs.cs: added initial implementations for
	2.0SP1/3.5 classes used in the (to be implemented) new xxxAsync
	methods of the Socket class.

svn path=/trunk/mcs/; revision=102790
2008-05-08 05:12:35 +00:00
Miguel de Icaza 6bcdaef726 2008-04-17 Miguel de Icaza <[email protected]>
* NetworkStream.cs: Throw an IOException if the socket is not
	connected, not an ArgumentException.   

	Fixes #371923, it is also the way its documented on MSDN. 

svn path=/trunk/mcs/; revision=101082
2008-04-17 22:39:29 +00:00
Jb Evain 963ccb4ef8 merge back ml2 into trunk
svn path=/trunk/mcs/; revision=100557
2008-04-13 13:47:01 +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
Dick Porter 4fcd84462b 2008-02-01 Dick Porter <[email protected]>
* TcpClient.cs: If the Connect fails (when given an array of
	addresses) leave the socket object in a usable state.  Fixes bug
	355473.



svn path=/trunk/mcs/; revision=94523
2008-02-01 13:27:01 +00:00
Arina Itkes ddaf734d6a Fix for 9491 bug. Socket should not throw exception when it closed by another thread.
svn path=/trunk/mcs/; revision=91709
2007-12-20 14:30:11 +00:00
Atsushi Eno d63f9df2ff 2007-11-13 Atsushi Enomoto <[email protected]>
* NetworkStream.cs : in 2.0 Close() is not needed and does not exist.


svn path=/trunk/mcs/; revision=89538
2007-11-13 10:11:45 +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
Dick Porter e3c85ecc7b 2007-10-30 Dick Porter <[email protected]>
* UdpClient.cs: Don't set the multicast option twice.  Fixes bug
	324033.

2007-10-30  Dick Porter  <[email protected]>

	* UdpClientTest.cs: Test for 324033.



svn path=/trunk/mcs/; revision=88456
2007-10-30 13:55:11 +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
Adar Wesley 831089227a 2007-05-16 Adar Wesley <[email protected]>
* System20.csproj: added classes to compilation set IOControlCode.cs,
	IPPacketInformation.cs

	* CookieCollection.cs: added missing method strongly typed CopyTo.

	* CredentialCache.cs: added missing methods Add, Remove, GetCredential

	* HttpWebRequest.jvm.cs: added missing ClientCertificates getter.

	* ServicePoint.cs: added missing method CloseConnectionGroup.

	* WebClient.cs: added missing methods OnDownloadProgressChanged,
	OnUploadProgressChanged, GetWebRequest, GetWebResponse

	* WebHeaderCollection.cs: added missing methods IsRestricted, Add,
	Remove, Set.

	* WebProxy.cs: added missing method GetObjectData.

	* Socket.jvm.cs: added missing methods EndDisconnect, IOControl,
	Send 2.0 overloads, Receive 2.0 overloads, ReceiveMessageFrom,
	BeginReceiveMessageFrom, EndReceiveMessageFrom, 
	EndAccept 2.0 overloads, BeginSend, EndSend, BeginReceive, 
	EndReceive, SendFile, BeginSendFile, EndSendFile, Disconnect,
	DuplicateAndClose

svn path=/trunk/mcs/; revision=77472
2007-05-16 12:03:13 +00:00
Igor Zelmanovich 6577706197 2007-05-09 Igor Zelmanovich <[email protected]>
* Socket.jvm.cs: Handle property throws NotImplementedException.	

svn path=/trunk/mcs/; revision=77018
2007-05-09 14:11:06 +00:00
Igor Zelmanovich 6f3ec291af 2007-05-09 Igor Zelmanovich <[email protected]>
* Win32Exception.cs:
	added MonoNotSupported attribute for TARGATE_JVM.	
		
	* NetworkStream.cs:
	* TcpClient.cs:
	* TcpListener.cs:
	* UdpClient.cs:			
	added MonoNotSupported attribute for TARGATE_JVM.	

svn path=/trunk/mcs/; revision=76996
2007-05-09 11:15:35 +00:00
Igor Zelmanovich b9bb9f9fc5 refactoring:
fixing line endings, no changes.

svn path=/trunk/mcs/; revision=76994
2007-05-09 09:51:07 +00:00
Konstantin Triger cdb8b6daa0 access selector resources before it's closed
svn path=/trunk/mcs/; revision=76072
2007-04-22 16:56:39 +00:00
Gert Driesen 155199945b * TcpClient.cs: Do not initialize network stream in Connect. In
Dispose, only nullify client if network stream was not obtained.
Fixes bug #81105.
* TcpClientTest.cs: Added test for bug #81105.

svn path=/trunk/mcs/; revision=74062
2007-03-11 13:02:52 +00:00
Ilya Kharmatsky 4552197281 Additional stubs for net_2_0 methods inserted, bugs fixes (introduced help
method - EnsureStillUsable)


svn path=/trunk/mcs/; revision=72027
2007-01-31 15:03:59 +00:00
Ilya Kharmatsky 77147055a3 Fixing the problems with compilation under JVM configuration (in Grasshopper),
by adding stubs and missing classes in net_2_0 for configuration. 


svn path=/trunk/mcs/; revision=71812
2007-01-28 17:16:39 +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
Dick Porter 3310e94b01 2007-01-24 Dick Porter <[email protected]>
* IOControlCode.cs: 
	* SocketInformationOptions.cs: 
	* TransmitFileOptions.cs: Fix enum values

	* AddressFamily.cs: Not Serializable in the 2.0 profile



svn path=/trunk/mcs/; revision=71605
2007-01-24 16:15:58 +00:00
Dick Porter 164ee390b7 2007-01-24 Dick Porter <[email protected]>
* NetworkStream.cs: 2.0 profile updates, based on a patch by
	Sridhar Kulkarni ([email protected])

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

	* NetworkStreamTest.cs: Test 2.0 ReadTimeout property



svn path=/trunk/mcs/; revision=71598
2007-01-24 15:26:47 +00:00