protected void HandleWrites(SocketState ss) { ArrayList socks = ss.WriteSocks; for (int i = 0; i < socks.Count; i++) { Socket s = (Socket)socks[i]; CreationState cs = ss.TakeCreationState(s); if (cs != null) { cs.HandleWritability(s); } else { //Let's try to flush the buffer: try { ss.FlushSocket(s); } catch { /* * We should close this edge */ TcpEdge tcpe = ss.GetEdge(s); TEL.RequestClose(tcpe); //Go ahead and forget about this socket. CloseAction ca = new CloseAction(tcpe, null); ca.Start(ss); } } } }
protected void HandleWrites(SocketState ss) { ArrayList socks = ss.WriteSocks; for(int i = 0; i < socks.Count; i++) { Socket s = (Socket)socks[i]; CreationState cs = ss.TakeCreationState( s ); if( cs != null ) { cs.HandleWritability(s); } else { //Let's try to flush the buffer: try { ss.FlushSocket(s); } catch { /* * We should close this edge */ TcpEdge tcpe = ss.GetEdge(s); TEL.RequestClose(tcpe); //Go ahead and forget about this socket. CloseAction ca = new CloseAction(tcpe, null); ca.Start(ss); } } } }