Re: Communicate over TCP/IP
- From: Giovanni Campagna <scampa giovanni gmail com>
- To: Baptiste Saleil <baptiste saleil gmail com>
- Cc: gnome-shell-list gnome org
- Subject: Re: Communicate over TCP/IP
- Date: Thu, 13 Sep 2012 19:04:01 +0200
2012/9/13 Baptiste Saleil <baptiste saleil gmail com>:
> Hi all.
>
> Just a simple question :
> I'm writing an extension for the shell.
> So, what's the best way to communicate over TCP/IP with this extension ?
Have a look at Gio: http://library.gnome.org/devel/gio/unstable/
It includes GSocket, wrapping the low-level BSD sockets, and higher
level wrappers such as GSocketClient and GSocketConnection.
Once you have that, you can get a GSocketInputStream /
GSocketOutputStream, wrap it with a GDataInputStream /
GDataOutputStream for buffering and formatting.
If you're doing binary communications, you probably need to target
3.6, as many operations did not support GBytes in 3.4.
Giovanni
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]