Re: Sockets in GTK, how to use?

2011-01-31 Thread Antono Vasiljev
Excerpts from Jacques Pelletier's message of 2011-01-31 08:16:51 +0200: } else { g_debug(%s, error-message); g_free(error); } Many thanks! This will help very much! This was pretty simple version. What I really wont to know is how to make this socket communication

Sockets in GTK, how to use?

2011-01-30 Thread Jacques Pelletier
Hi, I'm using Gnet 2.08 in my application and I would like to convert it to GTK for its socket functions. From the docs, I was able to figure out how to open a connection, but once the connection is opened, how do we read and write to a socket? JP

Re: Sockets in GTK, how to use?

2011-01-30 Thread Antono Vasiljev
Excerpts from Jacques Pelletier's message of 2011-01-30 18:37:34 +0200: I'm using Gnet 2.08 in my application and I would like to convert it to GTK for its socket functions. From the docs, I was able to figure out how to open a connection, but once the connection is opened, how do we read

Re: Sockets in GTK, how to use?

2011-01-30 Thread Antono Vasiljev
Excerpts from Jacques Pelletier's message of 2011-01-30 18:37:34 +0200: I'm using Gnet 2.08 in my application and I would like to convert it to GTK for its socket functions. From the docs, I was able to figure out how to open a connection, but once the connection is opened, how do we read

Re: Sockets in GTK, how to use?

2011-01-30 Thread Jacques Pelletier
On Sunday 30 January 2011 12:03:57 Antono Vasiljev wrote: Excerpts from Jacques Pelletier's message of 2011-01-30 18:37:34 +0200: I'm using Gnet 2.08 in my application and I would like to convert it to GTK for its socket functions. From the docs, I was able to figure out how to open a

Facing problem in using gtk-sockets

2011-01-17 Thread Lohitha R
Hi all, I just started using gtk sockets. Facing problem in using it. here i have given two case(case1 and case2). In case one its working fine, but in case two facing problem. Basically in the second case, the button click itself is not possible. I tried both in linux(slackware 12

GIO and netlink sockets

2010-12-06 Thread Jannis Pohlmann
Hi everyone, one quick question: does you GIO support netlink sockets? Or more precisely, does GIO support listening to netlink sockets in a way that allows a signal to be emitted or a callback to be called whenever there is incoming data on a netlink socket? I achieved this with Qt by creating

Re: GIO and sockets

2009-02-28 Thread Felipe Contreras
On Thu, Sep 4, 2008 at 4:29 AM, Dan Winship d...@gnome.org wrote: Felipe Contreras wrote: How should applications use sockets with GIO? I'm interested in hostname resolution, and socket handling. If possible also proxy handling. There isn't yet a good story here. See http

Re: GIO and sockets

2008-09-03 Thread Dan Winship
Felipe Contreras wrote: How should applications use sockets with GIO? I'm interested in hostname resolution, and socket handling. If possible also proxy handling. There isn't yet a good story here. See http://bugzilla.gnome.org/show_bug.cgi?id=515973 and http://bugzilla.gnome.org

Re: polling sockets using glib

2006-10-12 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Oct 10, 2006 at 08:48:54PM +0200, Soeren Sandmann wrote: Peter Robinson [EMAIL PROTECTED] writes: I am writing a server application (using glib) in which I want to be able to (frequently) turn polling on and off for given sockets

Re: polling sockets using glib

2006-10-10 Thread Peter Robinson
[EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Oct 09, 2006 at 09:20:59AM +1000, Peter Robinson wrote: Hi, I am writing a server application (using glib) in which I want to be able to (frequently) turn polling on and off for given sockets. I am

Re: polling sockets using glib

2006-10-10 Thread Soeren Sandmann
Peter Robinson [EMAIL PROTECTED] writes: I am writing a server application (using glib) in which I want to be able to (frequently) turn polling on and off for given sockets. You may want to take a look at this: http://www.daimi.au.dk/~sandmann/watch.h http://www.daimi.au.dk/~sandmann/watch.c

polling sockets using glib

2006-10-09 Thread Peter Robinson
Hi, I am writing a server application (using glib) in which I want to be able to (frequently) turn polling on and off for given sockets. I am currently using g_io_add_watch to add a watch on a socket and g_source_remove to remove the watch. This seems like an expensive way of doing what I want

Re: polling sockets using glib

2006-10-09 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Oct 09, 2006 at 09:20:59AM +1000, Peter Robinson wrote: Hi, I am writing a server application (using glib) in which I want to be able to (frequently) turn polling on and off for given sockets. I am currently using g_io_add_watch to add

Re: Sockets in GTK+?

2006-08-22 Thread Edward Catmur
On Mon, 2006-08-21 at 19:19 -0400, Samuel Cormier-Iijima wrote: Note that however GNet does NOT use GObject, it rolls its own object type... I kinda wanted a twisted-like framework so that I could for example subclass a GNetServer or otherwise connect signals to it to respond to network

Re: Sockets in GTK+?

2006-08-21 Thread Vivien Malerba
On 8/20/06, n3ck [EMAIL PROTECTED] wrote: Hi every1! Im was delphi (win) coder for a while but now i use linux as OS. I really like to code so i choose GTK for build applications on linux. I have been searching for some tutorial, text or articule about how to build cliente/server apps using

Re: Sockets in GTK+?

2006-08-21 Thread Chris Sparks
I went looking fo rGNet and what is odd is that it says this: It is written in C, object-oriented, and built upon GLib. C isn't object-oriented.. Chris Tristan Van Berkom wrote: Luka Napotnik wrote: GTK+ is a graphical library for creating UI's. For socket programming you have to

Re: Sockets in GTK+?

2006-08-21 Thread Vivien Malerba
On 8/21/06, Chris Sparks [EMAIL PROTECTED] wrote: I went looking fo rGNet and what is odd is that it says this: It is written in C, object-oriented, and built upon GLib. C isn't object-oriented.. The C language does not object, however nothing prevents you from having a Object oriented

Re: Sockets in GTK+?

2006-08-21 Thread Alan M. Evans
On Mon, 2006-08-21 at 06:18, Chris Sparks wrote: I went looking fo rGNet and what is odd is that it says this: It is written in C, object-oriented, and built upon GLib. C isn't object-oriented.. Object-oriented is a philosophy, not an attribute of a language. C++ supports objects

Re: Sockets in GTK+?

2006-08-20 Thread Luka Napotnik
GTK+ is a graphical library for creating UI's. For socket programming you have to use the Unix socket API. Greets, Luka On ned, 2006-08-20 at 10:18 -0500, n3ck wrote: Hi every1! Im was delphi (win) coder for a while but now i use linux as OS. I really like to code so i choose GTK for build

Re: Sockets in GTK+?

2006-08-20 Thread Tristan Van Berkom
Luka Napotnik wrote: GTK+ is a graphical library for creating UI's. For socket programming you have to use the Unix socket API. Well that is less and less true, glib/gobject is also becomming something like an stl of choice for C programming and is widely used outside the GUI domain.

Re: Threads, sockets and windows

2006-08-09 Thread Vladimir
before now. After network-related part I'll have to port audio IO part (written in ALSA). Thanks a lot for your reply ! Tor Lillqvist wrote: Armin Burgmeier writes: A probably better approach would be to let glib poll your sockets via creating GIOChannels and using g_io_add_watch to watch

Re: Threads, sockets and windows

2006-08-09 Thread Tor Lillqvist
g_io_channel_win32_new_fd() or g_io_channel_win32_socket(). (Vladimir presumably knows this, but for people who are wondering: In Win32, file descriptors (the integers that open() and dup() return) are implemented in the C library, not the kernel. Sockets again (the integers that socket() and accept() return

Threads, sockets and windows

2006-08-08 Thread Vladimir
Hello, I'm trying to write two-threaded program: one thread for GUI and the other for network. The network thread needs to poll network socket and to receive messages from the GUI thread (such as commands to send something to network or to disconnect). I've used pipe for commands, so in the

Re: Threads, sockets and windows

2006-08-08 Thread Frank Naumann
Hello! But on windows there is no poll() function. Of course I can use g_async_queue, but doing so I can't poll queue and network socket simultaneously. Under Window you can use select(). For myself I've written for Win32 a poll() function that internally use select() (so the code remains

Re: Threads, sockets and windows

2006-08-08 Thread Armin Burgmeier
clean and portable). (Whoops. I should have pressed reply to all. Sorry for the inconvenience, Frank.) The Windows select() function only works for sockets. One cannot give it a regular file descriptor (like a pipe). Note that sockets are no file descriptors on windows. signature.asc Description

Re: Threads, sockets and windows

2006-08-08 Thread Armin Burgmeier
a further event may be used to signal that new data is available in the g_async_queue. Extended documentation to the mentioned functions is available in the MSDN (http://msdn.microsoft.com). A probably better approach would be to let glib poll your sockets via creating GIOChannels and using

Re: Threads, sockets and windows

2006-08-08 Thread Frank Naumann
only works for sockets. One cannot give it a regular file descriptor (like a pipe). Note that sockets are no file descriptors on windows. Yes, right. I overseen the pipe. Regards, Frank ___ gtk-list mailing list gtk-list@gnome.org http

Re: Threads, sockets and windows

2006-08-08 Thread Tor Lillqvist
Armin Burgmeier writes: A probably better approach would be to let glib poll your sockets via creating GIOChannels and using g_io_add_watch to watch for events to occur. Yep, and this then will in fact use the WSAEventSelect mechanism on Windows. (In GLib = 2.8) Please note, though

Re: Threads, sockets and windows

2006-08-08 Thread Anna
setting up sockets pretty simple. I haven't used it on windows, but it has been ported. I imaging it should work. Added plus: you don't need threads. - Anna ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: Sockets with GTK 2.8.9 on WIN32

2006-02-13 Thread Gabriele Greco
Daniel Atallah wrote: That is one of the changes that were made in Glib 2.8.x. All of the win32 GIOChannel stuff was changed such that it'll leave your sockets in non-blocking mode. See this bug report for more information: http://bugzilla.gnome.org/show_bug.cgi?id=147392 This seems very

Re: Sockets with GTK 2.8.9 on WIN32

2006-02-13 Thread Tor Lillqvist
for sockets on Windows in GLib before 2.8 had a wholly different and more serious set of problems and Unix/Windows differences. Those caused a lot of problems when porting various GNOME platform libraries to Windows. See discussion for instance in bugs #120299 and #147392. In the old implementation

Re: Sockets with GTK 2.8.9 on WIN32

2006-02-10 Thread Daniel Atallah
On 2/10/06, Gabriele Greco [EMAIL PROTECTED] wrote: I've a problem on an application on WIN32 with GTK 2.8.x that works flawlessly with GTK 2.6.x (always on win32) or GTK 2.8.x (on unix). It seems that with 2.8.9 (the installer version got from gimp-win home) the sockets are handled as non

Re: Need help to work with sockets...

2005-08-05 Thread Hubert Sokołowski
gnet is a network library that might be usefull for you, http://www.gnetlibrary.org/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Need help to work with sockets...

2005-08-04 Thread Enrique Guzman
Hi all... I have to do an application that can send messages from one PC to another PC, Some like the Windows Pop up, my question is that... there are some widget that make the conection one to one, I have been reading some about the gtk sockets (.h), the Documentation about this widget isn´t

Need help to work with sockets...

2005-08-04 Thread Tor Lillqvist
this. If you can find a book that describes both, be happy.) If you strive for portability, avoid books targeted at Windows programmers only. Or search for tutorials on the net. there are some widget that make the conection one to one, I have been reading some about the gtk sockets (.h

g_io_channel and UDP sockets

2004-02-24 Thread Jeff Abrahamson
I have an app that talks UDP, and I'd like to use a glib-2.0 main event loop to handle communication. (I can handle it myself using sendto and recvfrom, but I'd like the main event loop to do polling for me and then call my handler functions. So I (apparently naively) write the following (with

Re: g_io_channel and UDP sockets

2004-02-24 Thread Sven Neumann
Hi, Jeff Abrahamson [EMAIL PROTECTED] writes: I have an app that talks UDP, and I'd like to use a glib-2.0 main event loop to handle communication. (I can handle it myself using sendto and recvfrom, but I'd like the main event loop to do polling for me and then call my handler functions.

Re: g_io_channel and UDP sockets

2004-02-24 Thread Jeff Abrahamson
to know quite so much about sockets. But it's no big loss, as I already know so much about sockets... -- Jeff Jeff Abrahamson http://www.purple.com/jeff/ GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B ___ gtk-list mailing list

Re: g_io_channel and UDP sockets

2004-02-24 Thread Sven Neumann
Hi, Jeff Abrahamson [EMAIL PROTECTED] writes: Setting the encoding unfortunately just gives me a different error stream. Now I see an infinite stream of these: (process:12739): GLib-CRITICAL **: file giochannel.c: line 1662 (g_io_channel_read_to_end): assertion `(error == NULL) ||

Re: g_io_channel and UDP sockets

2004-02-24 Thread J. Ali Harlow
On 2004.02.24 18:50 Jeff Abrahamson wrote: I get this by calling GError *err; iostat = g_io_channel_read_to_end(source, str_return, length, err); That should be GError *err = NULL; Cheers, Ali. ___ gtk-list mailing list [EMAIL PROTECTED]

Re: g_io_channel and UDP sockets

2004-02-24 Thread Jeff Abrahamson
On Tue, Feb 24, 2004 at 08:07:11PM +0100, Sven Neumann wrote: I get this by calling GError *err; iostat = g_io_channel_read_to_end(source, str_return, length, err); Read the docs on GError, you need to initialize the err variable to NULL. Thanks, I had misread that part.

Sockets and g_io_channel

2002-11-07 Thread Juan Agüí
Hi everyone! I developing an OSI protocol stack. I need one layer to communicate with another through a socket. The server application will be the Link Layer and the client application will be the Application Layer. The server waits for incoming datagrams listening on the socket and the client

Re: Sockets

2002-03-13 Thread Chris Nystrom
On Tue, 12 Mar 2002, Paul Davis wrote: GTK is a toolkit for creating graphical user interfaces. It has nothing to do with sockets or other IPC mechanisms, though it has some builtin support to make integrating I/O handling a little simpler. I think you need to look at another library

RE: Sockets

2002-03-13 Thread Kason Huang
maybe you need to use glibc library.it is more base than xlib. -Original Message- From: Chris Nystrom [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 1:38 AM To: Paul Davis Cc: Nicolas web; [EMAIL PROTECTED] Subject: Re: Sockets On Tue, 12 Mar 2002, Paul Davis wrote: GTK

Sockets

2002-03-12 Thread Nicolas web
Hi. Anyone can tell me how to make a connection IPC with GTK? I work with sockets without GTK. Exist sockets by GTK? Thanks. __ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com

Re: Sockets

2002-03-12 Thread Paul Davis
Hi. Anyone can tell me how to make a connection IPC with GTK? I work with sockets without GTK. Exist sockets by GTK? GTK is a toolkit for creating graphical user interfaces. It has nothing to do with sockets or other IPC mechanisms, though it has some builtin support to make integrating I/O

ADVICE SOUGHT: Sockets, Plugs and X11/Xt

2000-06-25 Thread Chen, Frank
Hi, I'm developing a GTK+ application but would like to integrate an existing X11/Xt multimedia application that I've developed some time ago. Can I use a socket and plug to accomplish the application integration? If 'yes' - any pointers to coded examples? Many thanks in advance. Frank Chen