socketError

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
chriss
Posts: 5
Joined: Mon Jun 26, 2006 6:23 pm

socketError

Post by chriss » Tue Jan 02, 2007 1:26 pm

i play around a liitle bit with the internet chatt sample to learn a bit about socket communication. is it possibel to get any massege in the client if the server (any server!!) does not reply or isnt any more online??

greetz to all

chriss

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jan 03, 2007 3:12 am

Hi Chriss,

You probably want to check out the socketClosed, socketError and socketTimeout messages. Note that the socketClosed message is sent if the server closes the socket. This allows you to give feedback when this message is received.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

chriss
Posts: 5
Joined: Mon Jun 26, 2006 6:23 pm

Post by chriss » Wed Jan 03, 2007 5:14 pm

THX mark.

I allready checked it and the on SocketClosed works perfect :-)

Greetz

Chriss

trevix
Posts: 1077
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

SocketError

Post by trevix » Fri Feb 22, 2008 12:33 pm

Trying to do some socket communication, I've got a SocketError 100061.

What is the meaning of this number ? Where can I find a list of the errorstring (as from documentation) and their meanings ?

I also noticed a different handling between OSX and Window:

On mac, if I have:

Code: Select all

open socket to App2IP with message "GotConn"

on GotCon
read from socket pSocket with message GotPacket
if the result is empty then--OK
else --we got error
--do someting else
end if
If the socket does not open, the script goes to SocketError and then does anyway the GotCon ("dosomething else").

On Window, if there is a socketError id does NOT goes to GotCon.

Anyone can explain this ?
Thanks

Post Reply