i'm trying to make a TCPObject listen and it seems to be behaving in a goofy manner
i've never tried this before and i can't tell what i'm doin wrong
if i make a TCPObject like so
new TCPObject(h);
and make it listen on port 5576
h.listen(5576); //also tried h.listen("localhost:5576"); in case dump told me a fibby
then define a simple onConnectRequest method like so
function h::onConnectRequest(%this, %addr, %id)
{
%c = new TCPObject(g, %id);
echo(%a TAB %i TAB %c);
echo("ya");
}
here's what absolutely does happen:
-any client i try to connect will report a successful connection
if i try in python
import socket
a = socket.socket()
a.connect(('localhost',5576))
nothing appears to go wrong; i can get the peer name and it will try to send and receive if i tell it to
if i try in torquescript
new TCPObject(j);
function j::onConnectorwhatever(%this)
{
echo("woo");
}
j.connect("localhost:5576");
it'll tell me "woo" and nothing appears to throw a fit if i try to communicate
-if i try to send anything to the server it will give the "Got bad connected receive event." error thing
from what i can tell, this is solved from it actually working and creating the client socket to respond, but..
here's what absolutely does not happen
-when the clients attempt to connect to the server (and supposedly successfully do so?), it does not appear to even call onConnectRequest
the debug echos do not fire off and g does not get created. i have tried other possible variations (onConnectionRequest, etc) and those also do not work
-any indication from the server that stuff is going on, other than when i attempt to send while connected
i have looked at other scripts and they appear to do very similar things, but clearly i'm messing up somewhere
i know i don't have the entire connection response handled but the function isn't even called at this point
doing a trace shows no activity when a connection begins or when data is buttsent