/// <summary> /// used to retrieve data sent by socketstate /// </summary> /// <param name="state"></param> public static void GetData(SocketState state) { state.theSocket.BeginReceive(state.messageBuffer, 0, state.messageBuffer.Length, SocketFlags.None, RecieveCallback, state); }
/// <summary> /// gracefully disconnect from a specific socket /// </summary> /// <param name="s"></param> public static void Disconnect(SocketState s) { s.theSocket.Disconnect(false); s.theSocket.Shutdown(SocketShutdown.Both); s.theSocket.Close(); }