GNetworkUnixServer

GNetworkUnixServer — Unix IPC server object.

Synopsis




struct      GNetworkUnixServer;
struct      GNetworkUnixServerClass;
GNetworkUnixServer* gnetwork_unix_server_new
                                            (const gchar *filename);
struct      GNetworkUnixServerCreationData;
G_CONST_RETURN gchar* gnetwork_unix_server_creation_data_get_filename
                                            (const GNetworkUnixServerCreationData *data);
gconstpointer gnetwork_unix_server_creation_data_get_socket
                                            (const GNetworkUnixServerCreationData *data);
GNetworkUnixServerCreationData* gnetwork_unix_server_creation_data_dup
                                            (const GNetworkUnixServerCreationData *src);
void        gnetwork_unix_server_creation_data_free
                                            (GNetworkUnixServerCreationData *data);


Object Hierarchy


  GObject
   +----GNetworkUnixServer

Implemented Interfaces

GNetworkUnixServer implements GNetworkServer.

Properties


  "filename"             gchararray            : Read / Write / Construct

Description

The GNetworkUnixServer object provides the capability to easily provide local UNIX-domain IPC services. The server object should be created with g_object_new() or gnetwork_unix_server_new(), and then opened with gnetwork_server_open().

New connections created by the user-set GNetworkServerCreateFunc connection-creation function should return a GNetworkUnixConnection object (or subclass), or NULL.

Details

struct GNetworkUnixServer

struct GNetworkUnixServer;

This structure contains no public data.


struct GNetworkUnixServerClass

struct GNetworkUnixServerClass {

};

This structure contains no public data.


gnetwork_unix_server_new ()

GNetworkUnixServer* gnetwork_unix_server_new
                                            (const gchar *filename);

Creates a new, unopened Unix server using filename. The filename should either be NULL or the unique name of a file to create for use by the server. If filename is NULL, a filename name will be automatically chosen in the temporary directory.

filename : the filename to use, or NULL.
Returns : a new GNetworkUnixServer object.

Since 1.0


struct GNetworkUnixServerCreationData

struct GNetworkUnixServerCreationData;

The structure encapsulated in the GValue argument to the user-provided GNetworkServerCreateFunc connection-creation function.


gnetwork_unix_server_creation_data_get_filename ()

G_CONST_RETURN gchar* gnetwork_unix_server_creation_data_get_filename
                                            (const GNetworkUnixServerCreationData *data);

Retrieves the filename string of the incoming connection in data.

data : the connection creation data to examine.
Returns : the filename of data.

gnetwork_unix_server_creation_data_get_socket ()

gconstpointer gnetwork_unix_server_creation_data_get_socket
                                            (const GNetworkUnixServerCreationData *data);

Retrieves the socket data (a file descriptor on Unix) in data.

data : the connection creation data to examine.
Returns : the socket of data.

gnetwork_unix_server_creation_data_dup ()

GNetworkUnixServerCreationData* gnetwork_unix_server_creation_data_dup
                                            (const GNetworkUnixServerCreationData *src);

Creates a copy of the creation data in src. The returned data should be freed with gnetwork_unix_server_creation_data_free() when no longer needed.

src : the creation data to copy.
Returns : a newly allocated copy of src.

Since 1.0


gnetwork_unix_server_creation_data_free ()

void        gnetwork_unix_server_creation_data_free
                                            (GNetworkUnixServerCreationData *data);

Frees the memory used by data.

data : the creation data to delete.

Since 1.0

Properties

The "filename" property

  "filename"             gchararray            : Read / Write / Construct

The socket filename.

Default value: NULL