I am developing an application on Unity3d for the WEBGL platform, and at the moment I need to write a server. I need the application to get a line from the server when it starts, then several times (when the user wants it) it already sent the line to the server. Since tcpClient / listeners do not work (?) On WEBGL, you have to use the www or webrequest classes. I know how to send GET / POST client requests via webrequest, but I do not know how to listen and receive these requests on the server. The server is written on .net (console or forms). Question: how to listen to incoming requests? With tcpListener, let's say we listen in a parallel thread in a loop, but how? What classes to use? Suppose a client sent a GET request to the server, the server should check the headers, and if everything is correct, send a response (string). Thank.

  • Так как tcpClient/listener'ы не работают (?) на WEBGL are you Так как tcpClient/listener'ы не работают (?) на WEBGL server on the web gl? The first thing is that it does not suit Google ? - tym32167 1:22 pm
  • No, I just wrote about the listener. The server is a regular console or Forms project. - the_anonymous
  • 2
    Use asp.net for the server - you can choose which one to use from it, for example asp.net MVC, asp.net WEB API, asp.net core - any of this can receive and process http get requests - tym32167
  • one
    If the server is a regular console, I would recommend looking towards the asp.net core - it can host the console, and under Linux, if necessary, you can start it. Here's a link to the tutorial Build web APIs with ASP.NET Core - tym32167
  • 2
    You can do without asp.net, you can write a server on HttpListener or directly in assembly language, if you have an infinite amount of time to implement it - tym32167

0