/// <summary>Creates a TCPSession for a Socket that was created by /// listening and accepting a connection.</summary> /// <param name="sock"></param> /// <param name="registry"></param> /// <exception cref="BEEPException" /> public static TCPSession createListener(System.Net.Sockets.TcpClient sock, ProfileRegistry registry) { return new TCPSession(sock, (ProfileRegistry) registry.Clone(), CHANNEL_START_EVEN, null, null, null, null); }
/// <summary>Creates a TCPSession for a Socket that was created by /// initiating a connection.</summary> /// <param name="sock"></param> /// <param name="registry"></param> /// <param name="servername"></param> /// <exception cref="BEEPException" /> public static TCPSession createInitiator(System.Net.Sockets.TcpClient sock, ProfileRegistry registry, string servername) { return new TCPSession(sock, (ProfileRegistry) registry.Clone(), CHANNEL_START_ODD, null, null, null, servername); }