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

52 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
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
Laurent Giroud
14d15b0f9c Fix: Connection.Connect() now correctly updates the Connection.Status property when needed.
Previously, it would never update it, even when users had opted to not receive status update change messages.
It now properly calls SetStatus() instead of modifying the m_status field directly.
2019-02-20 14:54:07 -05:00
AgentFire
f6a4bcc5b3 Added bool ReadMessage(out NetIncomingMessage message)
Added `bool ReadMessage(out NetIncomingMessage message)` for simplifying cases like this:

NetIncomingMessage msg;
while ((msg = NetClient.ReadMessage()) != null) { }

**into this**:

NetIncomingMessage msg;
while (NetClient.ReadMessage(out msg)) { }
2016-02-28 11:54:19 +03:00
AgentFire
f9053998cd Update NetPeer.cs
Fixed an issue in the `WaitMessage(int)` when `MessageReceivedEvent` is signaled, yet `ReadMessage()` returns null.
2015-10-05 16:33:46 +03:00
Marius Ungureanu
15a9a97ffb Refactor NetPeer.Connect code to throw on non-resolvable address. 2015-09-05 10:56:17 +03:00
Michael Lidgren
fa8b1e986d First iteration improved multiplatform support 2015-03-24 13:26:55 +01:00
Michael Lidgren
44bc4ff06e Recycling problems hopefully fully fixed now. Library message now also recycled. 2015-02-07 17:25:54 +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
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
fbddaf8962 NetQueue.TryDequeue failure will now only throw in DEBUG
WaitMessage will now create a wait event object if needed
2014-05-21 07:18:08 +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
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
5859971a7e Expanded comment on TryGetValues thread safety in GetConnection 2012-05-26 08:53:54 +00:00
lidgren
b4fd011e5b - ReadMessages() added to batch read messages. Image sample changed to use the new batch method. 2011-09-09 08:11:38 +00:00
lidgren
6a1654061e Fixed bug in WaitMessage() - when already queued message existed it would wait for next message to arrive anyway 2011-08-19 12:33:47 +00:00
lidgren
daa1d4e946 Fix for connecting twice or more to the same endpoint very quickly in succession 2011-06-19 16:48:56 +00:00
lidgren
713d91ac58 UPnP support added: get external ip, add forwarding rule and delete forwarding rule 2011-04-27 20:52:29 +00:00
lidgren
19000f8036 XML comments added to remove all warnings; Documentation.chm updated 2011-04-25 15:13:36 +00:00
lidgren
226bb301ce Bug in fragmentation fixed 2011-02-26 09:26:35 +00:00
lidgren
b83ec10d8d Handshakes are now resent if lost. Documentation updated. 2010-12-25 09:51:49 +00:00
lidgren
5666407931 NetPeer.GetConnection() made public 2010-11-23 21:56:29 +00:00
lidgren
3720cfee93 Fixed bug appearing when Connect called twice for same endpoint 2010-11-03 13:21:00 +00:00
lidgren
c29270a5cf Tag added to NetPeer 2010-11-03 11:27:00 +00:00
lidgren
f589208841 WaitMessage readded (again) 2010-10-30 19:55:38 +00:00
lidgren
8029d725d1 Lots of xml comments added. Documentation updated.
Removed extension methods to be able to compile for .net framework 2.0
2010-10-20 20:03:39 +00:00
lidgren
609bc1afe2 major update; gen 3.5 2010-10-19 17:45:55 +00:00
lidgren
1cf64dc015 NetQueue TryDequeue signature change 2010-09-05 10:37:39 +00:00
lidgren
d9281b586a Added NetPeer.NetworkThreadName setter 2010-08-15 10:30:36 +00:00
lidgren
d340cc58ef Added setter to NetworkThreadName 2010-08-15 10:25:07 +00:00
lidgren
cf60a5ef57 Enumerated and exposed network thread name 2010-08-13 06:44:07 +00:00
lidgren
38bb13b3a7 initializing network (including binding to socket) moved out from network thread, enabling catching of exceptions
ConnectionReset on reading handled properly (by disconnecting) when only one connection
readonly added to various members
2010-08-11 18:34:15 +00:00
lidgren
ae5633862d NetPeer ToString null check added 2010-08-07 13:40:31 +00:00
lidgren
ffe86262c6 NetOutgoingMessage.Write(string) now preallocates the correct amount of memory
NetPeer.MessageAvailable added
2010-08-07 07:46:06 +00:00
lidgren
d8308e584a Exception message clarified 2010-08-05 12:34:28 +00:00
lidgren
7bcf2f6e0d m_visibleStatus made internal 2010-07-26 10:33:06 +00:00
lidgren
494cc7acee Various ArgumentNullExceptions added 2010-07-26 07:48:10 +00:00
lidgren
ced71204ac NetClient.Connect() now prevents new connection if one already exists 2010-07-18 12:13:26 +00:00
lidgren
7cfdc0a218 GetConnection() added 2010-07-07 16:41:25 +00:00
lidgren
fa69daebbb TryConnect() added 2010-07-07 16:34:03 +00:00
lidgren
2aff5de88e Unconnected messages now marked as sent when sending 2010-06-28 08:06:41 +00:00
lidgren
14d3f3b390 Major refactoring of sending messages to multiple recipients 2010-06-21 19:22:21 +00:00
lidgren
9577d4b4a6 Missing project added; various code cleanups 2010-05-14 17:12:26 +00:00
lidgren
c1f8eff04b XNA extensions added 2010-05-09 08:16:02 +00:00