Unity TCP Socket Example by JamesVeug - 4

Games & Projects

Example project using Client-Server TCP Sockets to send chat messages between multiple clients

Unity 2018.3.0b12Unknown LicenseUpdated 268 days agoCreated on December 27th, 2018
Go to source

UnityTCPSocketExample

Example Unity chat project using Client-Server TCP Sockets to send chat messages between multiple clients.

alt text

What does this do?

  • Clients can connect to the server
  • The server listens for new clients
  • Connected clients on the server are given a basic name
  • Clients send messages to the server
  • Server dispatches messages to all connected clients
  • Clients display messages received from the server
  • Clients can use commands
    • !disconnect (disconnectes user from the server)
    • !ping (displays how long requests are taking)

What do the different text colors mean?

  • Red is for logs on the server (User has Connect/Disconnected… etc)
  • Grey is for logs on the client
  • Green is for messages from the server to the client

How to setup for users not on your local network

Show all projects by JamesVeug