Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Start()
- {
- listenerThread = new Thread(new ThreadStart(DoListen));
- listenerThread.Start();
- }
- // This subroutine is used a background listener thread to allow reading incoming
- // messages without lagging the user interface.
- private void DoListen()
- {
- try {
- // Listen for new connections.
- listener = new TcpListener(System.Net.IPAddress.Any, Port);
- listener.Start();
- do
- {
- Debug.Log("Listen");
- }
- while(true);
- }
- catch(Exception ex)
- {
- //MessageBox.Show(ex.ToString());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment