[gnio] Fix some spelling/typos
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnio] Fix some spelling/typos
- Date: Thu, 7 May 2009 17:02:42 -0400 (EDT)
commit feaade528285555fb43a6a020c2b51377371306b
Author: Dan Winship <danw gnome org>
Date: Thu May 7 17:02:23 2009 -0400
Fix some spelling/typos
---
gio/gsocket.c | 84 +++++++++++++++++++++---------------------
gio/gsocket.h | 4 +-
gio/gsocketcontrolmessage.c | 4 +-
gio/gsocketcontrolmessage.h | 2 +-
test/server.c | 2 +-
5 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/gio/gsocket.c b/gio/gsocket.c
index 90d9e50..460f69b 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -50,13 +50,13 @@
/**
* SECTION:gsocket
- * @short_description: Lowlevel network socket handling
+ * @short_description: Low-level network socket handling
* @include: gio/gio.h
* @see_also: #GInitable
*
- * A #GSocket is a lowlevel networking primitive. It is a more or less
+ * A #GSocket is a low-level networking primitive. It is a more or less
* direct mapping of the BSD socket API in a portable GObject based API.
- * It support both the unix socket implementations and winsock2 on Windows.
+ * It supports both the unix socket implementations and winsock2 on Windows.
*
* #GSocket is the platform independent base upon which the higher level
* network primitives are based. Applications are not typically meant to
@@ -66,14 +66,14 @@
* TODO: Add more references to the highlevel API once that is more
* finalized.
*
- * #GSocket implements the #GInitable interface, so if it is manually constucted
+ * #GSocket implements the #GInitable interface, so if it is manually constructed
* by e.g. g_object_new() you must call g_initable_init() and check the
* results before using the object. This is done automatically in
* g_socket_new() and g_socket_new_from_fd(), so these functions can return
* %NULL.
*
* Sockets operate in two general modes, blocking or non-blocking. When
- * in blocking modes all operations block until the requested operation
+ * in blocking mode all operations block until the requested operation
* is finished or there is an error. In non-blocking mode all calls that
* would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
* To know when a call would successfully run you can call g_socket_condition_check(),
@@ -86,11 +86,11 @@
* also happen for other reasons. For instance, on Windows a socket is
* always seen as writable until a write returns %G_IO_ERROR_WOULD_BLOCK.
*
- * #GSocket<!-- -->s can be both connection oriented or datagram based.
+ * #GSocket<!-- -->s can be either connection oriented or datagram based.
* For connection oriented types you must first establish a connection by
* either connecting to an address or accepting a connection from another
* address. For connectionless socket types the target/source address is
- * specified or recieved in each I/O operation.
+ * specified or received in each I/O operation.
*
* All socket file descriptors are set to be close-on-exec.
*
@@ -990,7 +990,7 @@ g_socket_set_reuse_address (GSocket *socket,
* g_socket_get_reuse_address:
* @socket: a #GSocket.
*
- * Gets the reuse_addres mode of the socket. For details on this,
+ * Gets the reuse_address mode of the socket. For details on this,
* see g_socket_set_reuse_address().
*
* Returns: %TRUE if address reuse is used, %FALSE otherwise.
@@ -1011,7 +1011,7 @@ g_socket_get_reuse_address (GSocket *socket)
* @keepalive: Whether to use try to keep the connection alive or not.
*
* Setting @reuse to %TRUE enables the sending of periodic ping requests
- * on idle connections in order to keep the conenction alive. This is only
+ * on idle connections in order to keep the connection alive. This is only
* useful for connection oriented sockets. The exact period used between
* each ping is system and protocol dependent.
*
@@ -1232,7 +1232,7 @@ g_socket_is_connected (GSocket *socket)
* @error: #GError for error reporting, or %NULL to ignore.
*
* Marks the socket as a server socket, i.e. a socket that is used
- * to accept incomming requests using g_socket_accept().
+ * to accept incoming requests using g_socket_accept().
*
* Before calling this the socket must be bound to a local address using
* g_socket_bind().
@@ -1273,7 +1273,7 @@ g_socket_listen (GSocket *socket,
* address (sometimes called name) of the socket.
*
* It is generally required to bind to a local address before you can
- * recieve connections. (See g_socket_listen() and g_socket_accept() ).
+ * receive connections. (See g_socket_listen() and g_socket_accept() ).
*
* Returns: %TRUE on success, %FALSE on error.
*
@@ -1316,16 +1316,16 @@ g_socket_bind (GSocket *socket,
* @socket: a #GSocket.
* @error: #GError for error reporting, or %NULL to ignore.
*
- * Accept incomming connections on a connection-based socket. This removes
+ * Accept incoming connections on a connection-based socket. This removes
* the first outstanding connection request from the listening socket and
* creates a #GSocket object for it.
*
* The @socket must be bound to a local address with g_socket_bind() and
- * must be listening for incomming connections (g_socket_listen()).
+ * must be listening for incoming connections (g_socket_listen()).
*
- * If there are no outstanding conneoctions then the operation will block
+ * If there are no outstanding connections then the operation will block
* or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
- * To be notified of an incomming connection, wait for the %G_IO_IN condition.
+ * To be notified of an incoming connection, wait for the %G_IO_IN condition.
*
* Returns: a new #GSocket, or %NULL on error.
* Free the returned object with g_object_unref().
@@ -1429,7 +1429,7 @@ g_socket_accept (GSocket *socket,
*
* For connection oriented socket this generally means we attempt to make
* a connection to the @address. For a connection-less socket it sets
- * the default address for g_socket_send() and discards all incomming datagrams
+ * the default address for g_socket_send() and discards all incoming datagrams
* from other sources.
*
* Generally connection oriented sockets can only connect once, but connection-less
@@ -1437,7 +1437,7 @@ g_socket_accept (GSocket *socket,
*
* If the connect call needs to do network I/O it will block, unless
* non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
- * and the user can be notified of the connectiong finishing by waiting
+ * and the user can be notified of the connection finishing by waiting
* for the G_IO_OUT condition. The result of the connection can then be
* checked with g_socket_check_pending_error().
*
@@ -1545,9 +1545,9 @@ g_socket_check_pending_error (GSocket *socket,
* depending on the type of socket the message is received from.
*
* If the socket is in blocking mode the call will block until there is
- * some data to recieve or there is an error. If there is no data availible
+ * some data to receive or there is an error. If there is no data available
* and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
- * will be returned. To be notified of availible data, wait for the %G_IO_IN
+ * will be returned. To be notified of available data, wait for the %G_IO_IN
* condition.
*
* On error -1 is returned and @error is set accordingly.
@@ -1609,9 +1609,9 @@ g_socket_receive (GSocket *socket,
* @address is owned by the caller.
*
* If the socket is in blocking mode the call will block until there is
- * some data to recieve or there is an error. If there is no data availible
+ * some data to receive or there is an error. If there is no data available
* and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
- * will be returned. To be notified of availible data, wait for the %G_IO_IN
+ * will be returned. To be notified of available data, wait for the %G_IO_IN
* condition.
*
* On error -1 is returned and @error is set accordingly.
@@ -1651,9 +1651,9 @@ g_socket_receive_from (GSocket *socket,
* with @address set to %NULL.
*
* If the socket is in blocking mode the call will block until there is
- * space for the data in the socket queue. If there is no space availible
+ * space for the data in the socket queue. If there is no space available
* and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
- * will be returned. To be notified of availible spave, wait for the %G_IO_OUT
+ * will be returned. To be notified of available space, wait for the %G_IO_OUT
* condition.
*
* Note that on Windows you can't rely on a %G_IO_OUT condition
@@ -1714,13 +1714,13 @@ g_socket_send (GSocket *socket,
* @error: #GError for error reporting, or %NULL to ignore.
*
* Tries to send @size bytes from @buffer to @address. If @address is
- * %NULL then the message is sent to the default reciever (set by
+ * %NULL then the message is sent to the default receiver (set by
* g_socket_connect()).
*
* If the socket is in blocking mode the call will block until there is
- * space for the data in the socket queue. If there is no space availible
+ * space for the data in the socket queue. If there is no space available
* and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
- * will be returned. To be notified of availible spave, wait for the %G_IO_OUT
+ * will be returned. To be notified of available space, wait for the %G_IO_OUT
* condition.
*
* Note that on Windows you can't rely on a %G_IO_OUT condition
@@ -2149,7 +2149,7 @@ winsock_source_new (GSocket *socket,
* @cancellable: a %GCancellable or %NULL
*
* Creates a %GSource that can be attached to a %GMainContext to monitor
- * for the availiblilty of the specified @condition on the socket.
+ * for the availibility of the specified @condition on the socket.
*
* The callback on the source is of the #GSocketSourceFunc type.
*
@@ -2351,7 +2351,7 @@ g_socket_condition_wait (GSocket *socket,
* fully-featured version of this call. For easier use, see
* g_socket_send() and g_socket_send_to().
*
- * If @address is %NULL then the message is sent to the default reciever
+ * If @address is %NULL then the message is sent to the default receiver
* (set by g_socket_connect()).
*
* @vector must point to an array of #GOutputVector structs and
@@ -2367,15 +2367,15 @@ g_socket_condition_wait (GSocket *socket,
* If @num_messages is -1 then @messages is treated as a %NULL-terminated
* array.
*
- * @flags modify how the message sent. The commonly availible arguments
- * for this is availible in the #GSocketMsgFlags enum, but the
+ * @flags modify how the message sent. The commonly available arguments
+ * for this is available in the #GSocketMsgFlags enum, but the
* values there are the same as the system values, and the flags
* are passed in as-is, so you can pass in system specific flags too.
*
* If the socket is in blocking mode the call will block until there is
- * space for the data in the socket queue. If there is no space availible
+ * space for the data in the socket queue. If there is no space available
* and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
- * will be returned. To be notified of availible spave, wait for the %G_IO_OUT
+ * will be returned. To be notified of available space, wait for the %G_IO_OUT
* condition.
*
* Note that on Windows you can't rely on a %G_IO_OUT condition
@@ -2639,15 +2639,15 @@ g_socket_send_message (GSocket *socket,
* @num_messages gives the number of #GSocketControlMessage instances
* in @messages (ie: not including the %NULL terminator).
*
- * @flags is an in/out parameter. The commonly availible arguments
- * for this is availible in the #GSocketMsgFlags enum, but the
+ * @flags is an in/out parameter. The commonly available arguments
+ * for this is available in the #GSocketMsgFlags enum, but the
* values there are the same as the system values, and the flags
* are passed in as-is, so you can pass in system specific flags too.
*
* If the socket is in blocking mode the call will block until there is
- * some data to recieve or there is an error. If there is no data availible
+ * some data to receive or there is an error. If there is no data available
* and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
- * will be returned. To be notified of availible data, wait for the %G_IO_IN
+ * will be returned. To be notified of available data, wait for the %G_IO_IN
* condition.
*
* On error -1 is returned and @error is set accordingly.
@@ -2758,7 +2758,7 @@ g_socket_receive_message (GSocket *socket,
g_set_error (error, G_IO_ERROR,
socket_io_error_from_errno (errsv),
- _("Error recieving message: %s"), socket_strerror (errsv));
+ _("Error receiving message: %s"), socket_strerror (errsv));
return -1;
}
@@ -2842,7 +2842,7 @@ g_socket_receive_message (GSocket *socket,
{
struct sockaddr_storage addr;
int addrlen;
- DWORD bytes_recieved;
+ DWORD bytes_received;
DWORD win_flags;
int result;
WSABUF *bufs;
@@ -2869,13 +2869,13 @@ g_socket_receive_message (GSocket *socket,
if (address)
result = WSARecvFrom (socket->priv->fd,
bufs, num_vectors,
- &bytes_recieved, &win_flags,
+ &bytes_received, &win_flags,
(struct sockaddr *)&addr, &addrlen,
NULL, NULL);
else
result = WSARecv (socket->priv->fd,
bufs, num_vectors,
- &bytes_recieved, &win_flags,
+ &bytes_received, &win_flags,
NULL, NULL);
if (result != 0)
{
@@ -2887,7 +2887,7 @@ g_socket_receive_message (GSocket *socket,
win32_unset_event_mask (socket, FD_READ);
g_set_error (error, G_IO_ERROR,
socket_io_error_from_errno (errsv),
- _("Error recieving message: %s"), socket_strerror (errsv));
+ _("Error receiving message: %s"), socket_strerror (errsv));
return -1;
}
@@ -2908,7 +2908,7 @@ g_socket_receive_message (GSocket *socket,
if (flags != NULL)
*flags = win_flags;
- return bytes_recieved;
+ return bytes_received;
}
#endif
}
diff --git a/gio/gsocket.h b/gio/gsocket.h
index 87c917d..eec93c1 100644
--- a/gio/gsocket.h
+++ b/gio/gsocket.h
@@ -85,12 +85,12 @@ typedef enum
/**
* GSocketMsgFlags:
- * @G_SOCKET_MSG_OOB: Request to send/recieve out of band data.
+ * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
* @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
* @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
*
* Flags used in g_socket_receive_message() and g_socket_send_message(). The flags listed in the enum are
- * some commonly availible flags, but the values used for them are the same as on the platform, and any other
+ * some commonly available flags, but the values used for them are the same as on the platform, and any other
* flags are passed in/out as is. So to use a platform specific flag, just include the right system header and
* pass in the flag.
*
diff --git a/gio/gsocketcontrolmessage.c b/gio/gsocketcontrolmessage.c
index d83ffb2..01f012b 100644
--- a/gio/gsocketcontrolmessage.c
+++ b/gio/gsocketcontrolmessage.c
@@ -33,10 +33,10 @@
* class and override the get_size, get_level, get_type and serialize
* methods.
*
- * To extend the set of control messages that can be recieved, subclass
+ * To extend the set of control messages that can be received, subclass
* this class and implement the deserialize method. Also, make sure your
* class is registered with the GType typesystem before calling
- * g_socket_recieve_message() to read such a message.
+ * g_socket_receive_message() to read such a message.
*
* Since: 2.22
**/
diff --git a/gio/gsocketcontrolmessage.h b/gio/gsocketcontrolmessage.h
index 0a6af86..0ee424a 100644
--- a/gio/gsocketcontrolmessage.h
+++ b/gio/gsocketcontrolmessage.h
@@ -37,7 +37,7 @@ G_BEGIN_DECLS
* GSocketControlMessage:
*
* Base class for socket-type specific control messages that can be sent and
- * recieved over #GSocket.
+ * received over #GSocket.
**/
typedef struct _GSocketControlMessage GSocketControlMessage;
typedef struct _GSocketControlMessagePrivate GSocketControlMessagePrivate;
diff --git a/test/server.c b/test/server.c
index 11a93ed..c598539 100644
--- a/test/server.c
+++ b/test/server.c
@@ -222,7 +222,7 @@ main (int argc,
if (size < 0)
{
- g_printerr ("Error recieving from socket: %s\n",
+ g_printerr ("Error receiving from socket: %s\n",
error->message);
return 1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]