gnome-vfs-socket
gnome-vfs-socket —
Synopsis
GnomeVFSResult (*GnomeVFSSocketReadFunc) (gpointer connection,
gpointer buffer,
GnomeVFSFileSize bytes,
GnomeVFSFileSize *bytes_read);
GnomeVFSResult (*GnomeVFSSocketWriteFunc) (gpointer connection,
gconstpointer buffer,
GnomeVFSFileSize bytes,
GnomeVFSFileSize *bytes_written);
void (*GnomeVFSSocketCloseFunc) (gpointer connection);
typedef GnomeVFSSocketImpl;
GnomeVFSSocket* gnome_vfs_socket_new (GnomeVFSSocketImpl *impl,
void *connection);
GnomeVFSResult gnome_vfs_socket_write (GnomeVFSSocket *socket,
gconstpointer buffer,
int bytes,
GnomeVFSFileSize *bytes_written);
GnomeVFSResult gnome_vfs_socket_close (GnomeVFSSocket *socket);
GnomeVFSResult gnome_vfs_socket_read (GnomeVFSSocket *socket,
gpointer buffer,
GnomeVFSFileSize bytes,
GnomeVFSFileSize *bytes_read);
Description
Details
GnomeVFSSocketCloseFunc ()
void (*GnomeVFSSocketCloseFunc) (gpointer connection);
GnomeVFSSocketImpl
typedef struct {
GnomeVFSSocketReadFunc read;
GnomeVFSSocketWriteFunc write;
GnomeVFSSocketCloseFunc close;
} GnomeVFSSocketImpl;
gnome_vfs_socket_new ()
GnomeVFSSocket* gnome_vfs_socket_new (GnomeVFSSocketImpl *impl,
void *connection);
impl : | an implementation of a socket, e.g. GnomeVFSSSL
|
connection : | pointer to a connection object used by impl to track
state (the exact nature of connection varies from implementation to
implementation)
|
Returns : | a newly created socket
|
gnome_vfs_socket_write ()
GnomeVFSResult gnome_vfs_socket_write (GnomeVFSSocket *socket,
gconstpointer buffer,
int bytes,
GnomeVFSFileSize *bytes_written);
socket : | socket to write data to
|
buffer : | data to write to the socket
|
bytes : | number of bytes from buffer to write to socket
|
bytes_written : | pointer to a GnomeVFSFileSize, will contain
the number of bytes actually written to the socket on return.
|
Returns : | GnomeVFSResult indicating the success of the operation
|
gnome_vfs_socket_close ()
GnomeVFSResult gnome_vfs_socket_close (GnomeVFSSocket *socket);
socket : | the socket to be closed
|
Returns : | GnomeVFSResult indicating the success of the operation
|
gnome_vfs_socket_read ()
GnomeVFSResult gnome_vfs_socket_read (GnomeVFSSocket *socket,
gpointer buffer,
GnomeVFSFileSize bytes,
GnomeVFSFileSize *bytes_read);
socket : | socket to read data from
|
buffer : | allocated buffer of at least bytes bytes to be read into
|
bytes : | number of bytes to read from socket into buffer
|
bytes_read : | pointer to a GnomeVFSFileSize, will contain
the number of bytes actually read from the socket on return.
|
Returns : | GnomeVFSResult indicating the success of the operation
|