SocketException: ConnectionReset - An app from Scratch

Options
Hello,

I´m new using Photon, and I managed to setup a self hosted server and launched Photon

The server side for the ChatServer app seems to be working fine, even the service.

When I run a client, I got the following...

INFO: Connecting to server at 127.0.0.1:4530 using TCP
ERROR: Receiving failed. SocketException: ConnectionReset
ERROR: DisconnectByServer
ERROR: Disconnect

I tried running chat server and chat client in my local machine, also in the server and tried to do a client-server connection, always getting the same error.

While running the ChatClient console, I see no logs in the server.

One last comment, the ChatServer application consumes a lot of cpu, any clue why?

Thanks and regards!

My PC: Windows 10, VS2019
Server: Windows 2016
.Net Frameworks, I build using 4.7.2, 4.6, 3.5

Comments

  • Mondix
    Options
    I couldnt figure out what is happening, but Im running the MMO demo without issues, so I think it is something missing in the code for the app from scratch...

    Note: MMO works using TCP and UDP
  • chvetsov
    Options
    Hi, @Mondix

    It is very sad that you have difficulties with our sample.
    Let's try to find a reason.
    Please add log messages to all suspicious places and start. we will be able to find what is wrong in such a way.

    >INFO: Connecting to server at 127.0.0.1:4530 using TCP
    please check CreatePeer method - whether it returns non-null value

    best,
    ilya
  • Mondix
    Options
    Hi @chvetsov

    You pointed exactly the issue.

    Im connected now.

    INFO: Connecting to server at 127.0.0.1:4530 using TCP
    INFO: Connected

    I wrote wrong the return new ChatPeer thing...
    Thats because I wanted to write all and do not copy paste, but after a few hours in the pc my brain seems to crashed :blush:

    Thank you!