1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-06 02:11:06 +09:00
Commit Graph

93 Commits

Author SHA1 Message Date
Pieter-Jan Briers
f0e5bb4515 IPv6: Space Wizard Edition.
This PR fixes the IPv6 support *properly*. The two previous PRs, #123 and #126, both made a mess out of it:

PR #123 implemented IPv6 by breaking non-dualstack IPv4 support.
PR #126 fixed IPv4 support by breaking non-dualstack IPv6 support.

This change fixes the mess entirely. IPv4, IPv6 and IPv6-dual-stack are now all independently supported and work as expected.
Namely IPv4 can't receive IPv6, IPv6 can only receive IPv4 if NetPeerConfiguration.DualStack is set. You can still have an IPv6-only socket.

I'll leave some review comments on the PR for less-immediately obvious changes.
2020-02-15 00:22:38 +01:00
Vladimir Kozlov
bbf05b991b Fixed an issue #132 (Incorrect network messages/malformed packets could easily overwhelm the server). NetPeer.Heartbeat() method will no longer prematurely return from the method in case of encountering an incorrect packet. 2019-12-24 23:43:52 +04:00
Badartefact
b9bfbb0be5 Fixed problem with setting correct local address when we change DualStack property. Do not use any IPv6 features by default. 2019-06-14 22:39:29 +03:00
CallumDev
85ad100f89 Can configure to be dual-mode, or plain IPv4/6 2019-06-10 02:28:38 +09:30
CallumDev
1a2301ddbc Implement IPv6 Dual Mode 2019-05-03 03:20:58 +09:30
lidgren
f9a56e4325 global mutex on bind added 2018-10-20 10:53:23 +02:00
Gordon MacPherson
b696ecde1d added some debug information for SIO_UDP_CONNRESET 2017-11-10 15:30:01 +00:00
RevoluPowered
9e5525711e disable socket.IOControl(SIO_UDP_CONNECT) on unix but not windows 2017-11-10 14:52:45 +00:00
RevoluPowered
4c81cf3c03 disabled code causes crash on OSX, but not on linux even though it's not supporte on unix. 2017-11-10 15:13:17 +00:00
Frank Versnel
27b3d8e386 Added improved NAT punch.
Clients that request an introduction now first request a confirmation from
the server to make sure unconnected messages can be sent in both
directions before attempting to make a connection. Similarly the server
automatically sends a confirmation to the client to reduce the possiblity
that either one of the endpoints has issues with sending messages to the
other.
2016-02-15 16:58:06 +01:00
lidgren
f58745c99d Merge pull request #46 from hide1202/master
Removed goto statement in NetPeer.Internal.
2016-02-05 11:33:32 +01:00
hide1202
53f4383555 Remove goto statement in NetPeer.Internal. 2015-10-04 10:01:24 +09:00
Marius Ungureanu
ba35bfc624 Use UTF8 instead of ASCII decoding for heartbeats 2015-09-18 06:20:10 +03:00
Michael Lidgren
c42b885e1f don't take double lock unnecessarily 2015-09-07 09:44:11 +02:00
MichaelDePiazzi
1560ba75d8 fix: UPnP discovery response did not time out 2015-07-27 14:28:59 +08:00
Michael Lidgren
387f786950 Fixed number of fragments statistics, fixed dropping duplicates for early received reliable unordered messages, added dropped messages statistics 2015-06-09 14:10:28 +02:00
Michael Lidgren
fa8b1e986d First iteration improved multiplatform support 2015-03-24 13:26:55 +01:00
Michael Lidgren
b3fffb52e5 changed remaining float representations of time to doubles 2015-02-06 18:57:42 +01:00
Michael Lidgren
5879fb641e Rev397-400 on google code; fixes to recycling and minor tweak to heartbeat calling when a disconnection occurs 2015-01-25 16:05:49 +01:00
Michael Lidgren
4b7b53b36d added mutex for access to m_handshake everywhere except count requests 2015-01-21 08:52:28 +01:00
Michael Lidgren
d57f7045fe m_needFlushSendQueue added to prevent traversing sender channels each heartbeat 2015-01-20 17:39:03 +01:00
lidgren
601666d9fb Fix to rebind same port as previously bound 2014-10-11 08:25:21 +00:00
lidgren
2b9135b312 Don't try to parse packets identified as UPnP responses even when UPnP response parsing fails 2014-10-10 15:55:55 +00:00
lidgren
0d2955637d Added NetConnection.CanSendImmediately() to determine if the sliding window is full
Recycle outgoing dropped messages
Encryption using CryptoProviders refactored 
Added NetUnreliableSizeBehaviour to configure behaviour for unreliable messages above MTU
Debug stats show number of received fragments
2014-10-10 15:25:54 +00:00
lidgren
e206ba210e Added code to rebind socket after a NetConnected socket error; thanks Rhee 2014-10-08 12:08:43 +00:00
lidgren
f2aa4b4ce2 Warnings and minor inconsistencies fixed 2014-08-25 07:34:56 +00:00
lidgren
5f5cd5ecf6 NetRandom updated; four implementations provided: Multiply with carry, XorShift, Mersenne Twister and RNGCryptoServiceProvider based 2014-08-07 22:53:24 +00:00
lidgren
4bfb24da96 Added some UNITY defines; fix by aeronaut84. Untested. 2014-08-02 18:01:30 +00:00
lidgren
57eba64f6f Premature checkin problem fixed 2014-07-31 19:03:55 +00:00
lidgren
d2ae3cf41d BREAKING CHANGE: NatIntroductionSuccess is now DISABLED by default; you must enable it using EnableMessageType
Added GarbageThrowerSample - a small library sample that sends random and semi-random data to detect problems
Made lots of changes that caused exceptions when malformed data was received
2014-07-31 14:55:50 +00:00
lidgren
04593ef00f Added NetPeer.ThrowOrLog
Changed a bunch of exceptions for consistency and safety
Enabled AutoExpandMTU for SpeedSample
2014-07-31 13:16:09 +00:00
lidgren
28ca421b63 Added option to specify synchronizationcontext when registering callback 2014-01-22 13:59:39 +00:00
lidgren
f32e40d048 Fixed AcceptIncomingConnections = false actualling having an effect 2013-05-07 07:37:27 +00:00
lidgren
5798c84406 - Ugh, got halfcreated file in last checkin; reverted 2012-12-18 08:45:51 +00:00
lidgren
bf2987b168 Fixed m_connectionLookup was not cleared on shutdown 2012-12-18 08:30:08 +00:00
lidgren
44971f0afc Modified UPnP response handling 2012-11-15 08:29:31 +00:00
lidgren
b6d2111380 Release build fixed for NetPeerSettingsWindow
ManyClients project excluded missing app.config file
Reduced number of calls to NetTime.Now when receiving multiple messages
Moved magic numbers to constants in NetConnection
2012-11-05 13:39:57 +00:00
lidgren
2db09b002d - UPnP changes - now tries to parse any incoming message, regardless of port 2012-10-25 08:12:14 +00:00
lidgren
2e7761e113 UnregisterReceivedCallback added 2012-09-18 15:12:34 +00:00
lidgren
b4b01aa52d Fix for time issue 129; thanks to jujjyl 2012-08-23 12:55:12 +00:00
lidgren
1ecf9fd8b8 Changed all Endpoint to EndPoint for consistency 2012-07-06 21:28:13 +00:00
lidgren
d11dcbe257 Invalid warning message about status fixed 2012-07-06 18:29:57 +00:00
lidgren
fbb6d9ed51 - Patch from MonoGame; makes the BroadcastAddress configurable and changes text encoding from ASCII to UTF8, required for Android support 2012-06-08 07:35:02 +00:00
lidgren
a5781b4688 Flushing delayed packets when shutting down NetPeer 2012-05-26 09:08:04 +00:00
lidgren
af3608c544 Extra try-catch added for socket.Shutdown() failing on mono 2011-12-19 10:20:11 +00:00
lidgren
ba7cf8f381 SIO_UDP_CONNRESET now try-catched since not available in mono 2011-11-28 08:10:58 +00:00
lidgren
95850b205a Suppressed Connection Reset messages. Fixed Chat server sample. 2011-11-06 09:24:08 +00:00
lidgren
60a6b28189 NetPeerConfiguration.AutoFlushSendQueue added. When set to false; application must call NetPeer.FlushSendQueue manually. 2011-09-12 09:34:50 +00:00
lidgren
39459f6833 throw explanatory exception if trying to register callback with no sycnhronizationcontext 2011-07-18 21:08:08 +00:00
lidgren
9554d33492 One more define to allow unity web player to run 2011-06-21 06:47:34 +00:00