Exemple #1
0
 void Init()
 {
     networkHelper = (new GameObject("NetworkHelper")).AddComponent <NetworkHelper>();
     protocol      = new LVProtocol();
     listener      = new USocketListener(OnOpen, OnClose);
     socket        = new USocket(listener, protocol);
     sender        = new USocketSender(socket);
     netState      = NetState.Inited;
 }
Exemple #2
0
 public void Reset()
 {
     socket   = new USocket(listener, protocol);
     sender   = new USocketSender(socket);
     netState = NetState.Inited;
 }