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; }
public void Reset() { socket = new USocket(listener, protocol); sender = new USocketSender(socket); netState = NetState.Inited; }