public static IEnumerator OpenStream(float waitTime) { yield return(new WaitForSeconds(waitTime)); TcpClient _socketConnection; try { _socketConnection = new TcpClient(ServerControlForm.GetUrl(), ServerControlForm.GetPort()); PublicLevel.SetServerStream(_socketConnection.GetStream()); } catch (SocketException socketException) { Debug.Log("SocketException " + socketException.ToString()); StageButtonMultiplayer.NetworkErrorPanelactive(); } }