[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: winsock: needs access to SOCKET in application code
From: |
Bruno Haible |
Subject: |
Re: winsock: needs access to SOCKET in application code |
Date: |
Wed, 15 Oct 2008 02:45:50 +0200 |
User-agent: |
KMail/1.5.4 |
Simon Josefsson wrote:
> Maybe something for the 'sockets' module, it is rather Windows specific?
Hmm, I see the 'sockets' module more like the general facilities, that
everyone who uses sockets needs. I would therefore somewhat prefer to see
the declaration of this function in <sys/socket.h> and its implementation
in a separate module.
> +int gl_sockets_from_fd (int fd);
'sockets' in plural? I think 'gl_socket_from_fd' would be better, or
'gl_fd_to_socket'?
The return type should be SOCKET, which is either `unsigned int' or
'unsigned long' (don't know about win64).
Also, it would be good to either have this function return INVALID_SOCKET
if it's not a socket, for robustness - or name the function differently,
to make it clear that the result can be any HANDLE, not necessarily a socket.
Bruno
- winsock: needs access to SOCKET in application code, Simon Josefsson, 2008/10/13
- Re: winsock: needs access to SOCKET in application code, Bruno Haible, 2008/10/13
- Re: winsock: needs access to SOCKET in application code, Paolo Bonzini, 2008/10/14
- Re: winsock: needs access to SOCKET in application code, Simon Josefsson, 2008/10/14
- Re: winsock: needs access to SOCKET in application code, Paolo Bonzini, 2008/10/14
- Re: winsock: needs access to SOCKET in application code,
Bruno Haible <=
- Re: winsock: needs access to SOCKET in application code, Simon Josefsson, 2008/10/15
- Re: winsock: needs access to SOCKET in application code, Bruno Haible, 2008/10/15
- Re: winsock: needs access to SOCKET in application code, Simon Josefsson, 2008/10/16
Re: winsock: needs access to SOCKET in application code, Simon Josefsson, 2008/10/14