public void Start_Restart() { var server = new TCPServer(); server.Start(6022); server.Close(); server.Start(6022); server.Close(); }
private void StartGame() { panelsManager.ShowGamePanel(); state = GameState.GAME; ServerStartGameMessage ssgm = new ServerStartGameMessage(); os.Close(); s.ServerSend(ssgm); }
private void OnDisable() { server.Close(); server.OnServerOpen -= InvokeOnServerOpen; server.OnServerClose -= InvokeOnServerClose; server.OnOpen -= InvokeOnOpen; server.OnMessage -= InvokeOnMessage; server.OnClose -= InvokeOnClose; server.OnError -= InvokeOnError; }
public void Close() { if (Client != null) { Client.Close(); } if (Server != null) { Server.Close(); } }
/// <summary> /// アプリ終了時に呼び出し、Serverを止める /// </summary> public void StopTCPServer() { try { //closeしてるけど送受信がどうなってるかは謎 tServer.Close(); } catch (Exception e) { Debug.Log(e); } }
void OnApplicationQuit() { if (m_ServerSession != null) { m_ServerSession.Close(); m_ServerSession = null; } if (m_ClientSession != null) { m_ClientSession.Close(); m_ClientSession = null; } }
void OnGUI() { GUILayout.BeginArea(new Rect(10, 10, 200, 200)); GUILayout.Label("TCP/IP SERVER: : " + server.GetClientCount()); if (GUILayout.Button("ConnectToServer")) { server.Setup(); } if (GUILayout.Button("Close")) { server.Close(); } GUILayout.Space(20); GUILayout.Label("RECEIVE: " + receiveStr); sendStr = GUILayout.TextField(sendStr); if (GUILayout.Button("Send")) { server.Send(sendStr); } GUILayout.EndArea(); }
private void OnApplicationQuit() { server.Close(); }
public void Close() { _refereeServer.Close(); }
public void btnClose_Click() { server.Close(); }