mIRC Home    About    Download    Register    News    Help

Print Thread
#106802 04/01/05 05:32 AM
Joined: Dec 2002
Posts: 111
E
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
when you establish a connection to a socket with sockopen, do you have to have the sockwrite command inside of an on *:sockopen event, or can you just do:

sockopen name port
sockwrite name data

without having to put the sockwrite inside of an on *:sockopen

?

thanks!

#106803 04/01/05 05:34 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
You have to put it in the on sockopen event, as there is no way to know if the socket is open yet. It might not open immediately, or it might just not open at all.

Greets

#106804 04/01/05 07:05 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You don't need to have /sockwrite inside of a sock* event. You would however need to ensure the socket is actually open before writing to it. (Hint: $sock(<name>).status)

#106805 04/01/05 07:30 AM
Joined: Dec 2002
Posts: 111
E
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
yeah, i just worked around it and got it all working with an on *:sockopen event laugh


thanks!


Link Copied to Clipboard