realbasic-plugins
[Top] [All Lists]

REALSocketGetEvents

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: REALSocketGetEvents
From: Marco Bambini <marco at sqlabs dot net>
Date: Mon, 29 Nov 2004 14:16:39 +0100
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <S dot 0000403963 at mail dot tempel dot org>
Hi all,

before send any data to a socket, I need to know if the socket is valid (maybe the server has crashed or disconnected).
What is the proper way to check if a socket is valid and connected?

Can I write something like this?

int flags;

// have I to call REALSocketPoll(socket) here?
flags = REALSocketGetEvents(socket, 0);
if (flags & socketEventError)
        HandleSocketError()
else
        SendData(...);

Thanks a lot for your help.

Regards,
Marco Bambini

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>