private void Start() { ResponseManager.instance.Clear(); server = new Server(); _serverResponseHandler = new ServerResponseHandler(server); _serverResponseHandler.Initialize(); InitializeCommands(); instance = this; //Create("127.0.0.1", 1525, 50000, 1000, "", "NA"); //ListenForCommands(); //return; Console.WriteLine("Enter the server's ip"); var ip = Console.ReadLine(); Console.WriteLine("Enter the server's port"); var port = Console.ReadLine(); var bufferSize = 256000; Create(ip, int.Parse(port), bufferSize); ListenForCommands(); }
void Awake() { ResponseManager.instance.Clear(); DontDestroyOnLoad(gameObject); server = new Server(); _serverResponseHandler = new ServerResponseHandler(server); _serverResponseHandler.Initialize(); InitializeCommands(); }