EasyNet
EasyNet
Hey guys,
i wrote an easy to use wrapper over RakNet. If you have ever had problems setting up network in your game, have a look at those 4 little files. The zip archieve includes everything, which is needed of to set up networking in a msvc or devcpp (mingw) environment. Well you might want to have a look at the example here:
http://www.allaboutschick.com/files/eas ... ample.html
Got interested? Well grab the archieve here:
http://www.allaboutschick.com/files/easynet.zip
Best regrads,
schick
i wrote an easy to use wrapper over RakNet. If you have ever had problems setting up network in your game, have a look at those 4 little files. The zip archieve includes everything, which is needed of to set up networking in a msvc or devcpp (mingw) environment. Well you might want to have a look at the example here:
http://www.allaboutschick.com/files/eas ... ample.html
Got interested? Well grab the archieve here:
http://www.allaboutschick.com/files/easynet.zip
Best regrads,
schick
Please send me an e-mail instead of a private message.
Schick's code is in very clean OOP style. Maybe using of exceptions makes it to look difficult, but belive me - it's realy easy then directly using of RakNet.Dingsi wrote: I didnt examine your source very well but the pieces at the example page I've sawn arent looking easier than RakNet to me.
Hm, I still can't believe that schick have only 1-2 years practice with C++ /he wrote something like this in Open Discussion forum./
Very good style by me. I even tougth that he works in this buisness. Congrats!
OO until you get to the switch statement!
Just an example of how I would do it:
Just an example of how I would do it:
Code: Select all
typedef std::map<int, MessageHandler> MessageHandlerMapType;
MessageHandlerType messageHandlers;
messageHandlers[ID_CHATMESSAGE] = new ChatMessageHandler();
virtual void OnPacket(net::IPacket& packet) {
MessageHandler* handler = messageHandlers[packet.get_PacketID()];
handler->HandlePacket(packet);
}
Congratulations schick!!! great work!! and great solution!!!!
plz can you put a documentation of easyNET independet of raknet??
Example:
messages what raknet process itself and examples of messages what raknet cant proccess.
how can we do a log the messages of raknet and the messagges of the easynet
summarizing :
in a conection between client with server .... a documentation about the historial of what messages send them with raknet and a historial ( or log) of messages with easynet
and during connection (during the game) a historial the messages what sendding between client and server if it has a error (lose connection, etc)
The idea is we could know what in our online games of what messages we must plan and proccess and what menssagges raknet and easy can proccess it .
thank!!!
plz can you put a documentation of easyNET independet of raknet??
Example:
messages what raknet process itself and examples of messages what raknet cant proccess.
how can we do a log the messages of raknet and the messagges of the easynet
summarizing :
in a conection between client with server .... a documentation about the historial of what messages send them with raknet and a historial ( or log) of messages with easynet
and during connection (during the game) a historial the messages what sendding between client and server if it has a error (lose connection, etc)
The idea is we could know what in our online games of what messages we must plan and proccess and what menssagges raknet and easy can proccess it .
thank!!!