Search Unity

.Net Sockets

Discussion in 'Multiplayer' started by CoopOwnz, Jan 16, 2017.

  1. CoopOwnz

    CoopOwnz

    Joined:
    Oct 6, 2016
    Posts:
    74
    So I've been reading and doing some tutorials. I have a basic chat application using Tcp .Net sockets. It works on any devices as long as they are on the same network. I want to make this work for phones on 3G/4G as well. I have a web server that I can use but have no idea how to set that up as the server. Are their any tutorials on setting up your webserver to use with application?
     
  2. CoopOwnz

    CoopOwnz

    Joined:
    Oct 6, 2016
    Posts:
    74
    Okay so the goal is: Set up my web server to listen and accept TCP connections on a specific port. Once a TCP connection is established the device sends messages to the server and the server will broadcast them appropriately to all other devices.
    The reality: No idea how to set up the server end to listen and accept connections. Some idea how to set up the client side as it's similar to what I've already done.

    I could really use someone to point me in the right direction. Thanks

    EDIT: I setup nodejs on my digitalocean server. I imported socket.io to my unity project. I now have a working chat client that sends messages to server and server sends messages back. So it's basically working.
     
    Last edited: Jan 17, 2017