public void Start() { TCPSetting serverSetting = TestDefine.GetTCPSetting(); server = new TCPServer(serverSetting); server.onConnectionConnect += OnAccepted; server.onConnectionDropped += OnConnectionDropped; server.onReceiveCallback += OnRevecie; server.Listen(); }
public void Start() { TCPSetting clientSetting = TestDefine.GetTCPSetting(); client = new TCPClient(clientSetting); client.onConnectCallback += OnConnected; client.onConnectFailedCallback += OnConnectedFail; client.onClosedCallback += OnCloseCallback; client.onReceiveCallback += OnRevecie; client.Connect(); }