Commit Graph

1930 Commits

Author SHA1 Message Date
Paul Pacheco
a302c180d3 refactor: naming convention 2019-04-06 07:43:55 -05:00
Paul Pacheco
adb16921c8 style: naming convention 2019-04-06 07:41:57 -05:00
Paul Pacheco
76392a3a4e refactor: keep consistent namespace 2019-04-06 07:33:47 -05:00
Paul Pacheco
3a7646bab7 refactor: simplify switch 2019-04-06 07:16:36 -05:00
Paul Pacheco
0e285a5645 style: use simplest function available 2019-04-06 07:05:31 -05:00
Paul Pacheco
87e962b52b style: 2 lines if 2019-04-06 07:01:48 -05:00
Paul Pacheco
eb1654f26e style: naming convention 2019-04-06 06:56:16 -05:00
Paul Pacheco
314dde7d40 style: naming convention 2019-04-06 06:53:57 -05:00
Paul Pacheco
e8679a0562 refactor: remove pointless if 2019-04-06 06:51:37 -05:00
vis2k
b202473bcf syntax 2019-04-06 13:33:38 +02:00
vis2k
9d2682eb2a NetworkServer.SetupLocalPlayerForConnection: removed unused variable 2019-04-06 13:33:18 +02:00
vis2k
512c7ff521 NetworkManager.OnServerConnectInternal: simplify code 2019-04-06 13:18:21 +02:00
vis2k
c5236f5504 ClientScene.DestroyAllClientObjects is now called from ClientScene.Shutdown so that the NetworkManager doesn't have to worry about it 2019-04-06 13:13:32 +02:00
vis2k
a9a2afd06e
Remove NetworkManager.address because it seems pointless (#744) 2019-04-06 13:03:25 +02:00
vis2k
dfd729850e NetworkIdentity.ClearObservers: simplify code 2019-04-06 12:43:22 +02:00
vis2k
dac128f036 NetworkIdentity.SetLocalPlayer: use foreach 2019-04-06 12:42:30 +02:00
vis2k
1ad3b120b6 NetworkIdentity.OnUpdateVars: reuse NetworkBehaviours which already calls GetComponents if not initialized yet 2019-04-06 12:40:46 +02:00
vis2k
242cf9f1d2 NetworkIdentity.OnStartClient: fix log message 2019-04-06 12:36:44 +02:00
vis2k
9e8dc924de NetworkClient.RegisterHandler: remove unnecessary ToString 2019-04-06 12:32:11 +02:00
vis2k
c6fffc6505 add empty line 2019-04-06 12:20:58 +02:00
vis2k
54a24d7bda ClientScene.AddPlayer: use proper variable name 2019-04-06 12:09:52 +02:00
vis2k
ef14026be4 ClientScene.RemovePlayer: shorter code 2019-04-06 12:09:00 +02:00
vis2k
fb716df129 fix: NetworkClient.Shutdown calls ClientScene.Shutdown again to properly clean up client scene. ClientScene only cleans up itself without touching transport or NetworkIdentities (fixes the bug where the player object wouldn't be destroyed after calling StopClient) 2019-04-06 12:03:57 +02:00
MrGadget
c691c07d96 Added EditorBrowsable(EditorBrowsableState.Never) to Obsoletes (#741) 2019-04-06 10:43:14 +02:00
rodolphito
333bbb062a A gift for vis. (#742) 2019-04-06 10:42:52 +02:00
rodolphito
9d0cf977f9 Use checked() syntax to throw on overflow (#740)
* Use checked() syntax to throw on overflow

* Expect exceptions in the tests. Tests pass now.
2019-04-05 19:49:49 -05:00
rodolphito
b995a98743 Fixed NetworkReader tests, everything passes now. Also sneaked in two more tests for 0-length byte arrays because the conventional test didnt apply to them, since they didnt throw when there wasnt any data for them. Also made NetworkReader throw when it can't satisfy a request to read bytes past EOS. (#739) 2019-04-05 18:37:13 -05:00
rodolphito
f64e127378 Add tests for buffer overrun, raising the bar on NetworkReader. (#734) 2019-04-06 00:20:04 +02:00
vis2k
bd9d7b9fd6 NetworkReader.ReadString throws exception again 2019-04-06 00:18:55 +02:00
vis2k
cc16df72cc Transport.TransportReceive catches exceptions and disconnects the connection after invalid data was received. (#737) 2019-04-06 00:17:45 +02:00
vis2k
7d2c5e5b0e remove empty whitespace 2019-04-05 23:48:18 +02:00
vis2k
64ed66edbe NetworkServer.InternalSetClientNotReady moved into SetClientNotReady because it can't be overwritten anymore anyway 2019-04-05 22:00:58 +02:00
vis2k
7b550fdf4b NetworkServer.SetAllClientsNotReady: simplify code 2019-04-05 22:00:15 +02:00
vis2k
a526c39228 NetworkServer.InternalReplacePlayerForConnection: rename 'playerGameObject' to 'player' for consistency with AddPlayerForConnection 2019-04-05 21:57:36 +02:00
vis2k
e27ebf65bb NetworkServer.InternalReplacePlayerForConnection: rename 'playerNetworkIdentity' to 'identity' for consistency with AddPlayerForConnection 2019-04-05 21:56:54 +02:00
vis2k
a3e9fbb5bd NetworkServer.DisconnectAllConnections: simplify code 2019-04-05 21:53:24 +02:00
vis2k
a574b181bb remove empty line 2019-04-05 21:45:01 +02:00
vis2k
fa64fa077f NetworkServer: move UpdateServerObjects into Update 2019-04-05 21:43:17 +02:00
vis2k
2048addde4 NetworkClient.RegisterSystemHandlers: add comments 2019-04-05 21:33:02 +02:00
vis2k
a7e0b2c728 Add LocalClient.cs generated meta file 2019-04-05 20:23:39 +02:00
MrGadget
355585f1fc
Fixed Typo 2019-04-05 14:21:50 -04:00
MrGadget
fdb81ca2b2 Add LocalClient.cs Dummy for Asset Store (#733)
This file should ship with 1.7 to the Asset Store, and can be removed when 1.8 is ready to publish to the store in a May 2019.
2019-04-05 20:14:02 +02:00
rodolphito
95baed5e83 Add tests for strange floats, doubles, and decimals (#732) 2019-04-05 20:13:19 +02:00
vis2k
de0b9b5789 NetworkClient.active reads from .connectState so we don't have redundant states. 2019-04-05 20:11:22 +02:00
rodolphito
04370e56c0 Add more test cases to string read/write. (#731) 2019-04-05 19:52:39 +02:00
rodolphito
015d0d508e fix: Potential DOS attack on server by sending packed ulongs when packed uints are expected. (#730)
* fix: Potential DOS attack on server by sending packed ulongs when packed uints are expected.

* Update NetworkReader.cs
2019-04-05 19:52:00 +02:00
rodolphito
3cee3abc48 fix: Potential DOS attack by sending invalid UTF8 byte sequences (#727)
* fix: Potential DOS attack by sending invalid UTF8 byte sequences

* Added test case for invalid UTF8 bytes
2019-04-05 19:47:37 +02:00
rodolphito
0d2f64228c Added Unicode Strings test (#728) 2019-04-05 18:12:28 +02:00
vis2k
fdd35bc840 List Server Example: read IP from bytes again after list server IPv6 bug was fixed 2019-04-05 11:26:31 +02:00
rodolphito
4ee787b0eb What even is m_td? Rename it to something that can actually be read. (#709) 2019-04-05 09:59:45 +02:00