Get low level socket errors. (Specifically bind failure when listening on a server) #442
Replies: 4 comments 4 replies
-
We can take a PR but this is strongly a per-transport situation, and not something we can implement universally. |
Beta Was this translation helpful? Give feedback.
-
Sockets do not usually tell you why they fail. |
Beta Was this translation helpful? Give feedback.
-
You have to keep in mind FishNet rarely has direct access to the used transport. EG: Tugboat uses LiteNetLib which returns connect/disconnect/data callbacks, not actually sure if it provides specific reasoning in the callbacks. But even if it did the likeliness of all transports doing this is pretty low. While this could maybe be implemented for some (again, have not looked), there's no way it would work for all. If anything the transport specifically should be printing to log when able, not FishNet itself. |
Beta Was this translation helpful? Give feedback.
-
Closing this as I do not believe time will be found to add this in specifically for each transport. I do encourage you to make a PR if you'd like to see this in any certain transport. |
Beta Was this translation helpful? Give feedback.
-
I get notifications when my server fails to start, and the console gets the guessed-error
Server failed to start. This usually occurs when the specified port is unavailable, be it closed or already in use.
But to aid work, I want to know why it failed, (and OS will happily give you out real reasons for not binding to a port, eg. blocked <1000 on mac)
I'm happy to add some code to the transports to fetch proper errors, but there's no API to access that error, only state.
Beta Was this translation helpful? Give feedback.
All reactions