added enet_socket_get_option() and ENET_SOCKOPT_ERROR
This commit is contained in:
@@ -201,6 +201,19 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
|
||||
return result == SOCKET_ERROR ? -1 : 0;
|
||||
}
|
||||
|
||||
int
|
||||
enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value)
|
||||
{
|
||||
int result = SOCKET_ERROR;
|
||||
switch (option)
|
||||
{
|
||||
case ENET_SOCKOPT_ERROR:
|
||||
result = setsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, sizeof (int));
|
||||
break;
|
||||
}
|
||||
return result == SOCKET_ERROR ? -1 : 0;
|
||||
}
|
||||
|
||||
int
|
||||
enet_socket_connect (ENetSocket socket, const ENetAddress * address)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user