Re: listening to socket
| From: | Mark Leavy | Date: | Tue, 17 Jul 2001 15:37:47 +0000 |
| Subject: | Re: listening to socket | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-2237@lists.php.net to get a copy of this message | ||
After you create the socket you could then do
gtk::input_add($fp,GDK_INPUT_READ,'get_message','');
Then when there is data waiting to be read from the socket the get_message()
function will be called.
MarkL
On Tuesday 17 July 2001 2:33 pm, Robert Abbate wrote:
> The only sockets I know are fopen, and fsockopen...both of which are not
> "listening" type sockets...they only "fetch". Do you have any functions in
> mind?
>
> Thanks
> Robert
>
> -----Original Message-----
> From: Andrei Zmievski [mailto:andrei@ispi.net]
> Sent: Tuesday, July 17, 2001 8:12 AM
> To: Robert Abbate
> Cc: php-gtk@lists.php.net
> Subject: Re: [PHP-GTK] listening to socket
>
> On Mon, 16 Jul 2001, Robert Abbate wrote:
> > I am trying to create the ability for GTK to "listen" for requests made
> > TO the client's computer.
> >
> > In essence, I am trying to create an instant messaging system using GTK.
> > Anyone have any ideas to get GTK to be able to receive a text page, and
> > alert the user?
> >
> > so far, I've gotten it to be able to grab the I.P. number of the client's
> > computer.
>
> Your best bet would be to utilize ext/sockets extension in PHP, since
> they provide all the functionality you need.
>
> -Andrei
> * We are not a clone. *