net\System\Net\_PooledStream.cs (8)
40private Socket m_AbortSocket; // in abort scenarios, used to abort connect
41private Socket m_AbortSocket6; // in abort scenarios, used to abort connect
157Socket socket = ServicePoint.GetConnection(this, owningObject, async, out address, ref m_AbortSocket, ref m_AbortSocket6);
197internal virtual void ConnectionCallback(object owningObject, Exception e, Socket socket, IPAddress address)
345protected Socket Socket {
596Socket socket = m_NetworkStream.InternalSocket;
617Socket socket4 = m_AbortSocket;
618Socket socket6 = m_AbortSocket6;
net\System\Net\ServicePoint.cs (25)
227internal Socket GetConnection(PooledStream PooledStream, object owner, bool async, out IPAddress address, ref Socket abortSocket, ref Socket abortSocket6)
229Socket socket = null;
230Socket socket6 = null;
231Socket finalSocket = null;
245if ( Socket.OSSupportsIPv4 ) {
249if ( Socket.OSSupportsIPv6 ) {
301private void CompleteGetConnection(Socket socket, Socket socket6, Socket finalSocket, IPAddress address) {
1206internal ConnectSocketState(ServicePoint servicePoint, PooledStream pooledStream, object owner, Socket s4, Socket s6)
1215internal Socket s4;
1216internal Socket s6;
1232Socket socket = null;
1286private void BindUsingDelegate(Socket socket, IPEndPoint remoteIPEndPoint)
1312private void SetUnicastReusePortForSocket(Socket socket)
1357private WebExceptionStatus ConnectSocketInternal(bool connectFailure, Socket s4, Socket s6, ref Socket socket,
1412Socket attemptSocket;
1510private WebExceptionStatus ConnectSocket(Socket s4, Socket s6, ref Socket socket, ref IPAddress address,
net\System\Net\Sockets\Socket.cs (48)
23/// <para>The <see cref='Sockets.Socket'/> class implements the Berkeley sockets
111private int m_CloseTimeout = Socket.DefaultCloseTimeout;
138/// Initializes a new instance of the <see cref='Sockets.Socket'/> class.
1205/// Creates a new <see cref='Sockets.Socket'/> instance to handle an incoming
1209public Socket Accept() {
1256Socket socket = CreateAcceptSocket(acceptedSocketHandle, m_RightEndPoint.Create(socketAddress), false);
5351public IAsyncResult BeginAccept(Socket acceptSocket, int receiveSize, AsyncCallback callback, object state) {
5378private void DoBeginAccept(Socket acceptSocket, int receiveSize, AcceptOverlappedAsyncResult asyncResult)
5473public Socket EndAccept(IAsyncResult asyncResult) {
5527Socket acceptedSocket = (Socket)result;
5543public Socket EndAccept( out byte[] buffer, IAsyncResult asyncResult) {
5547Socket socket = EndAccept(out innerBuffer,out bytesTransferred, asyncResult);
5557public Socket EndAccept( out byte[] buffer, out int bytesTransferred, IAsyncResult asyncResult) {
5577Socket socket = (Socket)castedAsyncResult.InternalWaitForCompletion();
6824if (!(socketList[current] is Socket)) {
6825throw new ArgumentException(SR.GetString(SR.net_sockets_select, socketList[current].GetType().FullName, typeof(System.Net.Sockets.Socket).FullName), "socketList");
6827fileDescriptorSet[current + 1] = ((Socket)socketList[current]).m_Handle.DangerousGetHandle();
6851Socket socket = socketList[currentSocket] as Socket;
7067internal MultipleAddressConnectAsyncResult(IPAddress[] addresses, int port, Socket socket, object myState, AsyncCallback myCallBack) :
7075internal Socket socket; // Keep this member just to avoid all the casting.
7322private Socket CreateAcceptSocket(SafeCloseSocket fd, EndPoint remoteEP, bool needCancelSelect) {
7326Socket socket = new Socket(fd);
7330internal Socket UpdateAcceptSocket(Socket socket, EndPoint remoteEP, bool needCancelSelect) {
7586GlobalLog.Enter("Socket#" + ValidationHelper.HashString(state) + "::RegisteredWaitCallback", "m_BlockEventBits:" + ((Socket)state).m_BlockEventBits.ToString());
7591Socket me = (Socket)state;
7610GlobalLog.Leave("Socket#" + ValidationHelper.HashString(state) + "::RegisteredWaitCallback", "m_BlockEventBits:" + ((Socket)state).m_BlockEventBits.ToString());
7887Socket attemptSocket = null;
7901Socket attemptSocket = new Socket(endPointSnapshot.AddressFamily, socketType, protocolType);
8586internal Socket m_AcceptSocket;
8587private Socket m_ConnectSocket;
8675private Socket m_CurrentSocket;
8726public Socket AcceptSocket {
8731public Socket ConnectSocket {
8998internal void StartOperationCommon(Socket socket) {
9777internal void FinishWrapperConnectSuccess(Socket connectSocket, int bytesTransferred, SocketFlags flags) {
9804if (Socket.s_PerfCountersEnabled) UpdatePerfCounters(bytesTransferred, false);
9861if (Socket.s_PerfCountersEnabled) UpdatePerfCounters(bytesTransferred, true);
9902if (Socket.s_PerfCountersEnabled) UpdatePerfCounters(bytesTransferred, false);
9911if (Socket.s_PerfCountersEnabled) UpdatePerfCounters(bytesTransferred, false);
9931if (Socket.s_PerfCountersEnabled) UpdatePerfCounters(bytesTransferred, false);
9978if (Socket.s_PerfCountersEnabled) UpdatePerfCounters(bytesTransferred, true);
9987if(Socket.s_PerfCountersEnabled) UpdatePerfCounters(bytesTransferred, true);
10012if (Socket.s_PerfCountersEnabled) UpdatePerfCounters(bytesTransferred, true);