Re: Communicate over TCP/IP



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]