GnomeVFS - Filesystem Abstraction library | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
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); |
GnomeVFSResult (*GnomeVFSSocketReadFunc) (gpointer connection, gpointer buffer, GnomeVFSFileSize bytes, GnomeVFSFileSize *bytes_read); |
GnomeVFSResult (*GnomeVFSSocketWriteFunc) (gpointer connection, gconstpointer buffer, GnomeVFSFileSize bytes, GnomeVFSFileSize *bytes_written); |
typedef struct { GnomeVFSSocketReadFunc read; GnomeVFSSocketWriteFunc write; GnomeVFSSocketCloseFunc close; } GnomeVFSSocketImpl; |
GnomeVFSSocket* gnome_vfs_socket_new (GnomeVFSSocketImpl *impl, void *connection); |
Creates a new GnomeVFS Socket using the specific implementation impl.
GnomeVFSResult gnome_vfs_socket_write (GnomeVFSSocket *socket, gconstpointer buffer, int bytes, GnomeVFSFileSize *bytes_written); |
Write bytes bytes of data from buffer to socket.
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 |
GnomeVFSResult gnome_vfs_socket_close (GnomeVFSSocket *socket); |
Close socket, freeing any resources it may be using.
GnomeVFSResult gnome_vfs_socket_read (GnomeVFSSocket *socket, gpointer buffer, GnomeVFSFileSize bytes, GnomeVFSFileSize *bytes_read); |
Read bytes bytes of data from the socket into buffer.
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 |