Commit Graph

45 Commits

Author SHA1 Message Date
jrb0001
db487e1264 Give every immediate order its own framing 2019-04-23 01:00:52 +02:00
jrb0001
f3133617dd Prevent immediate orders from being sent as regular orders 2019-04-23 01:00:52 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
42f1db0d4b Rename Stream.Write(byte[]) extension method to fix compatibility with newer mono. 2018-03-03 18:40:01 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
RoosterDragon
ca01a1f186 Presize MemoryStream when possible.
Also use GetBuffer when we know we have presized the stream to the exact required size to prevent a needless copy.
2017-12-19 00:59:11 +01:00
RoosterDragon
aa3024f1f8 Fix thread-safety and dispose issues in NetworkConnection.
- Calling Close() on a TcpClient is documented to also close the underlying sockets and streams for us. This means we can avoid also calling socket.Client.Close() and generating exceptions on mono.
- TcpClient is not thread-safe. However the NetworkStream returned by GetStream() is thread-safe for a single reader/single writer scenario. If we create and dispose the client on the calling thread, and pass the NetworkStream into the thread we spawn for reading, then we can avoid thread-safety issues incurred by trying to Close() the connection from another thread.
- The clean shutdown means we don't need to make the dodgy Thread.Abort() call as it will end normally, and that means we don't need a finalizer to ensure the thread is killed off.
- Refactor how receivedPackets work in EchoConnection to avoid lock(this).
- Mark connectionState and clientId as volatile since they are set from another thread.
2017-02-21 14:10:06 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Whinis
155c74fc5f Reworking ReplayRecorderConnection to no longer be an IConnection but rather attached to IConnection 2015-12-30 22:17:13 -05:00
RoosterDragon
6d02d5ebaa Remove some unneeded PerfSamples. 2015-12-23 20:19:22 +00:00
Matthias Mailänder
e428e6d8cc remove executable bits from source code 2015-08-06 18:05:50 +02:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Matthias Mailänder
7adacc0477 StyleCop clean Connection 2014-11-01 21:46:19 +01:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
Paul Chote
06be4d3efd Catch IOExceptions in Connection.cs. Closes #4083. Closes #4423. 2014-01-31 15:41:32 +13:00
Matthias Mailänder
b618fc7cc2 complete password protected servers
closes #2290
2013-10-07 19:37:12 +02:00
Matthias Mailänder
6b261534d8 remove some plenks
no logic changes
2013-06-17 22:50:39 +02:00
Chris Forbes
772734d032 merge cnc and ra lobby, fixes #1267, #1224, #106, others 2011-11-06 17:01:00 +13:00
Chris Forbes
bc6af1841b fix indents everywhere 2011-10-18 15:10:17 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Chris Forbes
1409016cbd (gecko) Allow mods to override order validation 2010-11-05 19:48:26 +13:00
geckosoft
6276e659cd Fixed: A crash when the host disconnects 2010-11-01 17:55:31 +13:00
Bob
c8ec5f3579 fix sync 2010-10-17 13:38:16 +13:00
Bob
3df310df6e halve bandwidth usage 2010-10-16 22:25:31 +13:00
Bob
c2b3a749ca change IConnection interface wrt sending 2010-10-16 21:05:14 +13:00
Bob
f8776d773d extract FrameData from OrderManager. fix disconnect bug in NetworkConnection 2010-10-12 17:22:17 +13:00
Bob
915ad7fb7b extract replay saving from OrderManager 2010-10-12 17:22:12 +13:00
Chris Forbes
39d7e54e7f fix one crash when server drops 2010-09-09 18:59:49 +12:00
Chris Forbes
0f20133af0 fix crash in retry 2010-08-03 20:40:27 +12:00
Chris Forbes
41b76144da force the socket closed so the client thread will die pretty fast. dirty hack, but teh read timeout is nuts otherwise. 2010-07-26 17:49:08 +12:00
alzeih
2254e48f65 little bit better threading [pchote: picked/amended] 2010-07-25 15:56:40 +12:00
alzeih
984e081f3b threadsafe 2010-07-23 21:40:06 +12:00
Chris Forbes
d5f12dd8ee trim down license spam in all files 2010-07-18 16:48:21 +12:00
Chris Forbes
f084f6d446 fix (one) crash on connection drop 2010-05-05 18:18:16 +12:00
Bob
9017aa9cd6 oops, NoDelay :S 2010-03-21 18:35:13 +12:00
Chris Forbes
b1d7f1fd69 added World.NeutralPlayer 2010-03-17 19:19:35 +13:00
Bob
962f1fa9b7 fix round-trip-time bug 2010-03-10 17:33:04 +13:00
Bob
79ce7c15d5 replays. 2010-03-10 15:58:03 +13:00
Paul Chote
cddefb3919 Game loads to main menu; "Connect to server" connects to localhost:1234. "Quit" quits. 2010-03-09 19:04:05 +13:00
alzeih
7881deca30 Everything is now OpenRA, not OpenRa 2010-02-27 21:10:22 +13:00