private void onWrite(IAsyncResult ar) { try { OnWriteEventArgs e = new OnWriteEventArgs(); m_stream.EndWrite(ar); m_writing = false; onWriteUserCallback.Invoke(this, e); } catch (Exception e) { throw e; } }
private void onWrite(IAsyncResult ar) { try { //I didn't like writing e.ClientID all over, so I made a new int to hold the id //which was passed to us as the AsyncNotAState. int id = (int)ar.AsyncState; //Create Args to send back to user...Just sending them the clientID anyway. OnWriteEventArgs e = new OnWriteEventArgs(); e.ClientID = id; //Done writing m_clients[id].Stream.EndWrite(ar); m_clients[id].Writing = false; //Invoke user callback onWriteUserCallback.Invoke(this, e); } catch (Exception e) { throw e; } }
private void onWrite(object sender, OnWriteEventArgs e) { }