// We are host public I2CPSession(I2CPHost host, Socket socket) { Host = host; MySocket = socket; CurrentState = new WaitProtVer(this); MySocket.BeginReceive(RecvBuf, 0, RecvBuf.Length, SocketFlags.None, new AsyncCallback(ReceiveCallback), this); }
internal void Run() { if (CurrentState == null) { Terminate(); return; } var os = CurrentState; var ns = CurrentState.Run(); if (os != ns && ns != null) { ns = ns.Run(); } CurrentState = ns; }