/* Initialize all fields */
sck->m_stream = TRUE;
sck->m_server = TRUE;
- sck->m_oriented = TRUE;
/* Create the socket */
sck->m_fd = socket(sck->m_local->m_realfamily, SOCK_STREAM, 0);
state after being previously closed.
*/
if (sck->m_reusable)
- setsockopt(socket->m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(u_long));
+ setsockopt(sck->m_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&arg, sizeof(u_long));
/* Bind to the local address,
* retrieve the actual address bound,
/* Initialize all fields */
connection->m_server = FALSE;
connection->m_stream = TRUE;
- connection->m_oriented = TRUE;
/* Setup the peer address field */
connection->m_peer = GAddress_new();
/* Streamed or dgram socket? */
sck->m_stream = (stream == GSOCK_STREAMED);
- sck->m_oriented = TRUE;
sck->m_server = FALSE;
sck->m_establishing = FALSE;
/* Initialize all fields */
sck->m_stream = FALSE;
sck->m_server = FALSE;
- sck->m_oriented = FALSE;
/* Create the socket */
sck->m_fd = socket(sck->m_local->m_realfamily, SOCK_DGRAM, 0);
return GSOCK_OPTERR;
}
-void GSocket_Streamed(GSocket *socket)
-{
- socket->m_stream = TRUE;
-}
-
-void GSocket_Unstreamed(GSocket *socket)
-{
- socket->m_stream = FALSE;
-}
-
#define CALL_CALLBACK(socket, event) { \
_GSocket_Disable(socket, event); \
if (socket->m_cbacks[event]) \