mIRC Home    About    Download    Register    News    Help

Print Thread
#96190 30/08/04 09:53 AM
Joined: Aug 2004
Posts: 13
P
p0rky Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Aug 2004
Posts: 13
Ok, this is my first time messing with sockets/sockbots, and say I wanted to display the status of the socket/sockbot into a list on a dialog, how would I do that?

Joined: Aug 2004
Posts: 13
P
p0rky Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Aug 2004
Posts: 13
lol, someone.. please? ;/

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
be patient p0rky, it's only been an hour or two. Ths is a slower time of day on here. If people have the knowledge to help you Im sure they will if you're patient smile And no, I can't answer you as I havent a clue about it sorry


Those who fail history are doomed to repeat it
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
You can retrieve the status of a socket using $sock(sockname).status which returns connecting when a connection is being established, and active when a connected has been established. It will also return $null if the socket has been disconnected, i.e. it is no longer open

Joined: Aug 2004
Posts: 13
P
p0rky Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Aug 2004
Posts: 13
ok that gives me "connecting", but when it connects, it doesnt stay connected (and I don't want it to) so how can i get it to tell me that it's disconnected, $sockerr?

Joined: Aug 2004
Posts: 13
P
p0rky Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Aug 2004
Posts: 13
or is it .wserr/.wsmsg?

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Houw 'bout on SOCKCLOSE?

Edit: Also, as sigh has already posted:

Quote:
It will also return $null if the socket has been disconnected, i.e. it is no longer open

Last edited by KingTomato; 30/08/04 07:28 PM.

-KingTomato

Link Copied to Clipboard