Forum C# Problem after deploy dll server code

Problem after deploy dll server code

Postby orenjuslabs » August 18th, 2019, 1:56 pm

Hi everyone,
I'm having problems with my game client when the .dll that I uploaded to Playerio doesn't work properly.
I have also disabled the script
Code: Select all
client.Multiplayer.DevelopmentServer = new ServerEndpoint("localhost", 8184);
but the results remain same.
Stuck at
Code: Select all
CreateJoinRoom
after that i got error logs
Code: Select all
Error Joining Room: PlayerIOClient.PlayerIOError: NetworkIssue; EndRead failed. IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
.

But when I am in Development mode using the app
Code: Select all
Player.IO Development Server
all callback messages can run properly from the server to my game client. Am I wrong in uploading .dll to the server or what?

Here my code:
Code: Select all
PlayerIO.Authenticate(
            "testgame-zjfmneq3fk6codjc3kc6og",
            "public",
            new Dictionary<string, string> {
                    { "userId", userid },
            },
            null,
            delegate (Client client) {
                Debug.LogError("Successfully connected to Player.IO");
                Debug.LogError("Create ServerEndpoint");
                //client.Multiplayer.DevelopmentServer = new ServerEndpoint("localhost", 8184);

                Debug.LogError("CreateJoinRoom");
                        client.Multiplayer.CreateJoinRoom(
                    "TestGame",
                    "TestGame",
                    true,
                    null,
                    null,
                    delegate (Connection connection) {
                        Debug.LogError("Joined Room.");
                        playerIOConnection = connection;
                        playerIOConnection.OnMessage += handleMessage;
                        joinedroom = true;
                    },
                    delegate (PlayerIOError error) {
                        Debug.LogError("Error Joining Room: " + error.ToString());
                    }
                );
            },
            delegate (PlayerIOError error) {
                Debug.LogError("Error connecting: " + error.ToString());
            }
        );


Im using Unity 2018.3.3f1 (client)
Vs2017 .net 4.5 (Server)

Sorry my bad englsh.
Thanks.
orenjuslabs
 
Posts: 5
Joined: August 14th, 2019, 3:25 pm

Re: Problem after deploy dll server code

Postby Henrik » September 20th, 2019, 7:44 am

If you don't override the client.Multiplayer.DevelopmentServer property, it means your game client will try to connect to the live game servers.

The error you're getting indicates some sort of network traffic error, are behind some sort of proxy or gateway that inspects/modifies/screws up your traffic? By default the game client connects to the game server on port 80, because it is most likely to get through firewalls, but the traffic isn't HTTP traffic, which means that some packet-inspecting firewalls or proxies kills the connections because of their rules.

You can use the GameServerEndpointFilter to remove the port 80 endpoint, which forces the game client to use the next port, 443, which firewalls/proxies might be more likely to leave alone?

https://playerio.com/documentation/refe ... ointFilter
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Problem after deploy dll server code

Postby orenjuslabs » September 23rd, 2019, 4:06 pm

Hi henrik, thank you very much for replying to my post. How do you set GameServerEndpointFilter? I am still new to using playerio sdk. I really hope to solve this problem. Once again, I say many thanks. Sorry, my English is not good.
orenjuslabs
 
Posts: 5
Joined: August 14th, 2019, 3:25 pm

Re: Problem after deploy dll server code

Postby orenjuslabs » September 23rd, 2019, 5:33 pm

It working now, i use this script to remove port 80:
Code: Select all
client.Multiplayer.GameServerEndpointFilter = GameServerEndpointFilterDelegate;


Code: Select all
private List<ServerEndpoint> GameServerEndpointFilterDelegate(List<ServerEndpoint> _endpoints)
    {
        _endpoints.RemoveAt(0);
        return _endpoints;
    }


Thanks, Henrik.
orenjuslabs
 
Posts: 5
Joined: August 14th, 2019, 3:25 pm

Re: Problem after deploy dll server code

Postby Henrik » September 25th, 2019, 10:10 pm

Awesome!
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Problem after deploy dll server code

Postby Emilyy » August 19th, 2022, 9:54 am

Henrik wrote:If you don't override the client.Multiplayer.DevelopmentServer property, it means your game client will try to connect to the live game servers.

The error you're getting indicates some sort of network traffic error, are behind some sort of proxy or gateway that inspects/modifies/screws up your traffic? By default the game client connects to the game server on port 80, because it is most likely to get through firewalls, but the traffic isn't HTTP traffic, which means that some packet-inspecting firewalls or proxies kills the connections because of their rules.

You can use the GameServerEndpointFilter to remove the port 80 endpoint, which forces the game client to use the next port, 443, which firewalls/proxies might be more likely to leave alone?

https://playerio.com/documentation/refe ... ointFilter -word hurdle

I understood the problem, thank you for your reply
Emilyy
 
Posts: 1
Joined: August 19th, 2022, 9:52 am


Return to C#



cron