GNet Network Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
struct GUnixSocket; GUnixSocket* gnet_unix_socket_connect (const |
GUnixSocket* gnet_unix_socket_connect (const |
A quick and easy GUnixSocket constructor. This connects to the specified path. This function does block. Use this function when you are a client connecting to a server and you don't mind blocking.
path : | |
Returns : |
|
GUnixSocket* gnet_unix_socket_new (const |
Connect to a specified address. Use this sort of socket when you're a client connecting to a server. This function will block to connect.
path : | |
Returns : |
|
void gnet_unix_socket_delete (GUnixSocket *s); |
Close and delete a GUnixSocket, regardless of reference count.
s : |
|
void gnet_unix_socket_ref (GUnixSocket *s); |
Increment the reference counter of a GUnixSocket.
s : |
|
void gnet_unix_socket_unref (GUnixSocket *s); |
Remove a reference from the GUnixSocket. When the reference count reaches 0, the socket is deleted.
s : |
|
|
Get the
For a client socket, the
For a server socket, however, the
There is one channel for every socket. This function refs the channel before returning it. You should unref the channel when you are done with it. However, you should not close the channel - this is done when you delete the socket.
socket : | |
Returns : |
|
|
Get the path of the socket.
socket : | |
Returns : |
|
GUnixSocket* gnet_unix_socket_server_new (const |
Create and open a new GUnixSocket with the specified path. Use this sort of socket when you are a server.
path : | |
Returns : |
|
GUnixSocket* gnet_unix_socket_server_accept (const GUnixSocket *socket); |
Accept connections from the socket. The socket must have been
created using gnet_unix_socket_server_new(). This function will
block (use gnet_unix_socket_server_accept_nonblock() if you don't
want to block). If the socket's
socket : | |
Returns : |
|
GUnixSocket* gnet_unix_socket_server_accept_nonblock (const GUnixSocket *socket); |
Accept a connection from the socket without blocking. The socket
must have been created using gnet_unix_socket_server_new(). This
function is best used with the socket's
socket : | |
Returns : |
|