Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-16 22:55:07 +0000
committerStijn Buys <ingar@osirion.org>2008-07-16 22:55:07 +0000
commiteb075660e7cb61b138c2da337115c59857f89e17 (patch)
tree0fe031a8f3562b22f61d0f95b740fe5f2326fd7b /src/core/netconnection.h
parentfecc54ad8c5a108831c2bc268f9dd7e16b511b7e (diff)
network protocol cleanup, radar test (doesn't work)
Diffstat (limited to 'src/core/netconnection.h')
-rw-r--r--src/core/netconnection.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/core/netconnection.h b/src/core/netconnection.h
index a2e9f2f..4e8d9f9 100644
--- a/src/core/netconnection.h
+++ b/src/core/netconnection.h
@@ -28,6 +28,7 @@
#include <deque>
#include <map>
+#include "core/entity.h"
#include "core/net.h"
namespace core
@@ -49,13 +50,22 @@ public:
/// process pending incoming messages
void frame(float seconds);
- /// buffer outgoing data
- void send(std::string const &msg);
+ /// send a connect message to the remote server
+ void send_connect();
- /// sennd a player info message
+ /// send a player info message to the remote server
void send_playerinfo();
- /// send bufered outgoing data
+ /// send a client update message to the remote server
+ void send_clientupdate(Entity *entity);
+
+ /// send a chat message
+ void send_say(std::string const &text);
+
+ /// send a command line to the remote server
+ void send_command(std::string const &cmdline);
+
+ /// transmit messages in the outgoing queue to the remote server
void transmit();
void abort();
@@ -81,6 +91,9 @@ public:
State connection_state;
protected:
+ /// add a message to the queue
+ void send(std::string const &msg);
+
/// receive incoming data and store messages
void receive();