예제 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _currentSession.Dispose();
         _currentSession = null;
     }
 }
예제 #2
0
        public async Task Connect(string host, int port)
        {
            var socket = new Socket(SocketType.Stream, ProtocolType.Tcp);
            await socket.ConnectAsync(host, port);

            var stream = new NetworkStream(socket, true);
            _currentSession = new SmppSession(stream, stream);
        }