question

adrianvat24 avatar image
adrianvat24 asked

What IPs and ports do i specify for a socket connection?

Hey, I am using Unity(C#) and I deployed a server in a windows container. I am able to request a server and get the IP.

On the server I have a TcpListener(address,port) and on the client I'm trying to connect to the TCP server (new TcpClient(ipAddress, port).

The way I did it on the server is I used Ip IPAddress.Any and port 10000(also added when i created the build as a tcp port) and on the client I am using the server's public IP address received in the RequestMultiplayerServerResponse and the TCP port from the same response.

It's not working...what am I doing wrong?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

You can debug your server build locally to see if it works locally by following Locally debugging game servers and integration with PlayFab. Or you can connect directly to debug game servers.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.