Need help with TCPObject.send()
by Skylar Kelty · in Torque Game Engine · 02/24/2008 (1:43 am) · 4 replies
Hey,
Im currently coding a login server for a game im working on, but i've run across a problem.
Everything seems to connect fine, but I cant .send() anything.
I did a brake-debug thing and found out that I get an unknown error in:
The error is always the same as the buffer size, is that ok?
Anyway I still cant actually send any data so help would be appreciated.
Thanks,
James
EDIT: found out its sending, and receiving, but not processing properly, im sure I can fix it, please ignore this :)
EDIT: no i need your help :)
The problem is in:
There are so many
Seems it will only process multiple lines, not a single line.
EDIT: sticking a "\n" on the end of everything i .send seems to work.
But im still not happy!
I think we should be able to send a single line!
Im currently coding a login server for a game im working on, but i've run across a problem.
Everything seems to connect fine, but I cant .send() anything.
I did a brake-debug thing and found out that I get an unknown error in:
Net::Error Net::send(NetSocket socket, const U8 *buffer, S32 bufferSize)
The error is always the same as the buffer size, is that ok?
Anyway I still cant actually send any data so help would be appreciated.
Thanks,
James
EDIT: found out its sending, and receiving, but not processing properly, im sure I can fix it, please ignore this :)
EDIT: no i need your help :)
The problem is in:
void TCPObject::parseLine(U8 *buffer, U32 *start, U32 bufferLen)
There are so many
if(i != bufferLen)that it never gets a chance to do anything!
Seems it will only process multiple lines, not a single line.
EDIT: sticking a "\n" on the end of everything i .send seems to work.
But im still not happy!
I think we should be able to send a single line!
About the author
Torque 3D Owner Thomas Huehn
The parseLine is very usefull thing, it makes sure you get each full line.