spacechase0 / StardewValleyMP

Temporary solution for multiplayer until official multiplayer is released.
MIT License
38 stars 17 forks source link

Fixed the mod for Linux/Mac. #44

Closed EnderHDMC closed 7 years ago

EnderHDMC commented 7 years ago

Changed so that it can be built on other operating systems without TcpListener.Create (line 363 - 364) Added option for IPv4 or IPv6 since Linux/Mac users were having issues. (lines 414 - 424)

spacechase0 commented 7 years ago

I'm concerned about the listener changes breaking IPv6 again. I changed from something similar to TcpListener.create in bc72139266a93757bc4713c873d273c98041c4a8.

While the option could be applied for the listener as well, I think that would require the host and all clients to all be IPv6 or all be IPv4. This would be far from ideal.

Also, it should be possible to detect if the given IP is IPv4 or IPv6 and choose the corresponding option doing the connection process. The config option might not be needed (unless we do end up using it for listening).

EnderHDMC commented 7 years ago

I changed the protocol version since it did not seem to work with Linux or Mac. It does seem to work connecting to a Windows server/client.

spacechase0 commented 7 years ago

Hey, I implemented this (well, the first part) in 7fe6d4a. I haven't tested it though, besides that it doesn't break it on Windows.

EnderHDMC commented 7 years ago

Will test it soon and post back with results.