0
\$\begingroup\$

I want to create a Unity WebGL application, that will run in a browser.

I want to allow this application to "listen" for messages, so it needs to be a server.

What could be the developing approach? Which functions can I use to listen for a TCP message?

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Who will be running this server, and who will be sending messages to it? If you mean for players to run this server in their browser, and friends to connect with them over the Internet, most routers/firewalls will block this by default. You'd need a separate server that you maintain that each client can bounce messages off of, and potentially use for "NAT punching" to establish a channel for them to communicate directly. \$\endgroup\$ Commented Oct 30, 2022 at 14:31
  • 1
    \$\begingroup\$ I don't think that it is possible for a browser application to act as a server. And definitely not raw TCP/IP. Best you can get are WebSockets and WebRTC. You are going to need a central server architecture for web-based multiplayer games. \$\endgroup\$ Commented Oct 30, 2022 at 14:43

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.