8 Commits

Author SHA1 Message Date
Fred Nicolson
e0e956cf78 Socket::reconfigure_socket called on connection to apply options
'TCP_NODELAY' is set automatically on connection now.
2016-12-31 11:14:26 +00:00
Cloaked9000
8a54e8994a Fixed read_raw buffer issues (properly this time).
Also added '<<' overload on Packet for char*
2016-12-21 17:57:39 +00:00
Cloaked9000
f74f1f1a94 Bug fixes. Better syntax.
SocketReactor actually calls callbacks.

receive_all no longer tries to access out of bound array indexes.

fr::Packet constructor can now take as many arguments as you like and they'll be added to it automatically.

Added bool fr::Packet<< operator overload.
2016-12-20 18:02:59 +00:00
Cloaked9000
70779fbe9c Added SocketReactor & fixes
Sockets will immediately return fr::Socket::Status::Disconnected if an attempt to send/receive data is made whilst the connection is closed.

Added SocketReactor, which is effectively a little wrapper around fr::SocketSelector, but can automatically call a callback for a socket when data is received on it.
2016-12-20 11:33:31 +00:00
Cloaked9000
7017b64a15 Moved fr::TcpSocket::shutdown to fr::Socket::shutdown 2016-12-20 10:12:13 +00:00
Cloaked9000
2de9540819 Added windows support. Updated build system.
CMake build system builds as a library, not an executable now.

Windows is now supported and should work fine.
2016-12-19 12:10:39 +00:00
Cloaked9000
69d183ed18 Code refactoring 2016-12-15 14:57:01 +00:00
Fred Nicolson
4f9502df23 Pushed code across 2016-12-06 23:07:54 +00:00