Question about TCPObject
by Bryan "daerid" Ross · in Torque Game Engine · 04/08/2002 (5:28 pm) · 4 replies
I'm trying to hash my way through using the TCPobject via script, and I've run into kinda a wall.
looking at the code, it seems that the number passed to %socket above is the actual file descriptor for the socket. I would expect that to be the identifier of a new TCPObject representing the newly connected socket.
How would I go about sending data to that socket?
new TCPObject(ListenSocket);
function ListenSocket::onConnectRequest(%address,%socket)
{
// now what?
}looking at the code, it seems that the number passed to %socket above is the actual file descriptor for the socket. I would expect that to be the identifier of a new TCPObject representing the newly connected socket.
How would I go about sending data to that socket?
#2
04/08/2002 (9:57 pm)
Thanks. That helped a lot :)
#3
-SC
08/11/2002 (7:13 am)
Am i right in thinking that you could use the TCPObject to connect to an external server?. Has anyone got some TCPObject code that would allow such a connection b/n server-server?-SC
#4
Josh
08/19/2002 (8:32 am)
Yes and no. In theory, you could do so, but the current implementation of TCPObject is still broken for listening. I did have a few ways of fixing it, but got distracted with other stuff. If you really want to know what exactly is wrong, let me know and I can write it up.Josh
Torque Owner Josh Goldshlag
Basically, the current implementation is broken for listening. In thinking about how to fix it, I have run into a few issues, but I think I should have a fixed version up in a few days.
I would also like to add arbitrary binary data sending and recieving, but that might have to wait for a bit.
Josh