mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
introducing libssh2_socket_t type and fixed iovec for windows
Steven Van Ingelgem introduces libssh2_socket_t as a generic socket type to use internally to avoid compiler warnings and mistakes. Also, the private struct iovec declaration for windows is now made to look like the POSIX struct does.
This commit is contained in:
@@ -78,7 +78,7 @@ static int wsa2errno(void)
|
||||
* to set errno
|
||||
*/
|
||||
ssize_t
|
||||
_libssh2_recv(int socket, void *buffer, size_t length, int flags)
|
||||
_libssh2_recv(libssh2_socket_t socket, void *buffer, size_t length, int flags)
|
||||
{
|
||||
ssize_t rc = recv(socket, buffer, length, flags);
|
||||
#ifdef WIN32
|
||||
@@ -97,7 +97,7 @@ _libssh2_recv(int socket, void *buffer, size_t length, int flags)
|
||||
* to set errno
|
||||
*/
|
||||
ssize_t
|
||||
_libssh2_send(int socket, const void *buffer, size_t length, int flags)
|
||||
_libssh2_send(libssh2_socket_t socket, const void *buffer, size_t length, int flags)
|
||||
{
|
||||
ssize_t rc = send(socket, buffer, length, flags);
|
||||
#ifdef WIN32
|
||||
|
||||
Reference in New Issue
Block a user