summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-06-12 23:51:52 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-06-12 23:51:52 +0200
commit6aedcd087462eb198958229f3c9785da6ac52cf3 (patch)
tree219c38296baefe188d2025f352d0020a72770183 /src
parent177c770bbb4c75b42688d5c5e7627c2fef8500e5 (diff)
downloadmad-6aedcd087462eb198958229f3c9785da6ac52cf3.tar
mad-6aedcd087462eb198958229f3c9785da6ac52cf3.zip
Receive richtig schreiben...
Diffstat (limited to 'src')
-rw-r--r--src/Net/Connection.cpp2
-rw-r--r--src/Net/Connection.h4
-rw-r--r--src/mad-core.cpp8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp
index 298eb3e..31821ac 100644
--- a/src/Net/Connection.cpp
+++ b/src/Net/Connection.cpp
@@ -47,7 +47,7 @@ bool Connection::send(const Packet &packet) {
return true;
}
-bool Connection::recieve() {
+bool Connection::receive() {
unsigned char *headerData = reinterpret_cast<unsigned char*>(&header);
ssize_t ret;
diff --git a/src/Net/Connection.h b/src/Net/Connection.h
index f48ef20..063ffb7 100644
--- a/src/Net/Connection.h
+++ b/src/Net/Connection.h
@@ -52,9 +52,9 @@ class Connection {
virtual bool dataPending() = 0;
bool send(const Packet &packet);
- bool recieve();
+ bool receive();
- sigc::signal<void,const Connection*,const Packet&> signalRecieve() const {return signal;}
+ sigc::signal<void,const Connection*,const Packet&> signalReceive() const {return signal;}
static void init() {
gnutls_global_init();
diff --git a/src/mad-core.cpp b/src/mad-core.cpp
index 76e7b9a..5ac0794 100644
--- a/src/mad-core.cpp
+++ b/src/mad-core.cpp
@@ -21,8 +21,8 @@
#include "Net/IPAddress.h"
#include <iostream>
-void recieveHandler(const Mad::Net::Connection*, const Mad::Net::Packet &packet) {
- std::cout << "Recieved packet:" << std::endl;
+void receiveHandler(const Mad::Net::Connection*, const Mad::Net::Packet &packet) {
+ std::cout << "Received packet:" << std::endl;
std::cout << " Type: " << packet.getType() << std::endl;
std::cout << " Request ID: " << packet.getRequestId() << std::endl;
std::cout << " Length: " << packet.getLength() << std::endl;
@@ -33,11 +33,11 @@ int main() {
Mad::Net::ServerConnection connection;
- connection.signalRecieve().connect(sigc::ptr_fun(recieveHandler));
+ connection.signalReceive().connect(sigc::ptr_fun(receiveHandler));
try {
connection.listen(Mad::Net::IPAddress("0.0.0.0", 6666));
- while(!connection.recieve());
+ while(!connection.receive());
}
catch(Mad::Net::Exception &e) {
std::cerr << "Connection error: " << e.what() << std::endl;