/// <summary> /// IProtocol.Connect 구현. 대상에 연결한다. /// </summary> /// <param name="address">상대 주소. Tcp는 IP:port, Host:port 형식</param> /// <param name="connected">연결 시 호출할 콜백</param> /// <param name="disconnected">단선 시 호출할 콜백</param> public Result Connect(string address) { Contract.Assert(session == null); session = new SessionTcp(this); return(session.Connect(address)); }
/// <summary> /// /// </summary> /// <param name="address"></param> /// <returns></returns> public Result Listen(string address, int backLog) { session = new SessionTcp(this); return(session.Listen(address, backLog)); }
public ProtocolTcp(Socket socket) { session = new SessionTcp(this, socket); }