🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Questions

Started by
9 comments, last by SharkBait 19 years, 2 months ago
With regards to your particular socket problem, how about registering STD-style input and output streams for sockets that use the << and >> operators? Such an approach would be typesafe and offer similar convenience:

For example:

// sending scriptsocketSend << MSG_CHAT << "hello there";socketSend << MSG_MOVE << id << x << y;:::// receiving scriptsocketReceive << msgCommand; // get commandif (msgCommand == MSG_CHAR)    socketReceive >> messageLine; // get CHAT parameterselse if (msgCommand == MSG_MOVE)    socketReceive >> id >> x >> y; // get MOVE parameters


I believe AS comes with sample code for registering stream-like objects.
tIDE Tile Map Editorhttp://tide.codeplex.com

This topic is closed to new replies.

Advertisement