version 1.82, 2006/06/26 22:23:29
|
version 1.83, 2006/06/28 00:15:41
|
|
|
} | } |
struct sockaddr* address; | struct sockaddr* address; |
| |
socklen_t address_size; |
SocketLength address_size; |
Mutex _connection_mut; | Mutex _connection_mut; |
| |
SocketHandle socket; | SocketHandle socket; |
|
|
if ( _portNumber == 0 ) | if ( _portNumber == 0 ) |
{ | { |
sockaddr_in buf; | sockaddr_in buf; |
socklen_t bufSize = sizeof(buf); |
SocketLength bufSize = sizeof(buf); |
if ( getsockname(_rep->socket, reinterpret_cast<sockaddr *>(&buf), &bufSize) == 0 ) | if ( getsockname(_rep->socket, reinterpret_cast<sockaddr *>(&buf), &bufSize) == 0 ) |
{ | { |
_portNumber = ntohs(buf.sin_port); | _portNumber = ntohs(buf.sin_port); |
|
|
// Accept the connection (populate the address): | // Accept the connection (populate the address): |
| |
struct sockaddr* accept_address; | struct sockaddr* accept_address; |
socklen_t address_size; |
SocketLength address_size; |
| |
if (_localConnection) | if (_localConnection) |
{ | { |