Leystryku / leysourceengineclient

A source engine network client implementation based on some of my reversing work from 2016 with basic functionality ( joining servers, talking, receiving/sending voicedata etc. ). Made this & reversed netchan to learn about Sources networking.
MIT License
173 stars 42 forks source link

Can't get a working connection #18

Open wrefgtzweve opened 3 years ago

wrefgtzweve commented 3 years ago

Whenever i try to join any garry's mod server it will constantly try to reconnect with the message

Connecting to XXXXX | client port: 27002 | Nick: XXXXXX| Pass:
Challenge: XXXXX|Auth: XXX|SKey: 0|VAC: 0
Server is telling us we can connect
Sent connect packet
Server is telling us we can connect
Sent connect packet
Received first ingame packet
out of order packet 1 at 274
Receiving complete: 1 fragments, 248 bytes
svc_Print:

XXXXXXXX
Map: XXXXXX
Players: XXX
Build: XXXX
Server Number: XXX

ServerInfo, XXXXXXX
ProcessServerInfo
Receiving complete: 1 fragments, 6 bytes
Received net_SignOnState: 2, count: -1
leychan::SetSignonState Should do SetSignonState  2, -1
leychan::SetSignonState Forced to reconnect

the XXXX's are stuff i replaced obviously

Claydo9 commented 3 years ago

Having this problem too.

Leystryku commented 2 years ago

I would recommend ensuring that the connection is as stable as possible (tends to happen more on WiFi). Additionally, try another port and retry maybe. Worst case, you will have to join anotehr server. I am not sure why exactly, but sometimes the packet order messes up a little and then the client is unable to connect.

Crionis commented 1 year ago

Client not working with ping above 20 ms. because (Garry's mod) server duplicate S2C_CONNECTION packets. Solution: Prevent resending client connection packets here https://github.com/Leystryku/leysourceengineclient/blob/01f71e3fe0124fb5aec54baaf57500957a4fe391/src/oob.cpp#L126