![]() | ![]() | ![]() | GNetwork Library Manual | ![]() |
---|
GNetworkUnixServer — Unix IPC server object.
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);
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.
struct GNetworkUnixServerClass { };
This structure contains no public data.
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;
The structure encapsulated in the GValue argument to the user-provided GNetworkServerCreateFunc connection-creation function.
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. |
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. |
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
void gnetwork_unix_server_creation_data_free (GNetworkUnixServerCreationData *data);
Frees the memory used by data.
data : | the creation data to delete. |
Since 1.0
"filename" gchararray : Read / Write / Construct
The socket filename.
Default value: NULL
<< GNetworkTcpServer | GNetworkDatagram >> |