GnuTLS is now supported on client side.
FossilOrigin-Name: 1cb3d6ca96bf4b9447418b5a3983a3abc8918d60ef745cc2600a353f4a7f559b
This commit is contained in:
@ -24,10 +24,9 @@
|
||||
|
||||
#include "conn.h"
|
||||
|
||||
int conn_recv_packet(struct conn* conn,uint8_t *buf,int len)
|
||||
int conn_recv_packet_(struct conn* conn,uint8_t *buf,int len,int flags)
|
||||
{
|
||||
int n;
|
||||
int flags=0;
|
||||
while( (n = recv(conn->sock,(char*)buf,len,flags)) < 0 ){
|
||||
if (errno!=EINTR)
|
||||
{
|
||||
@ -40,3 +39,17 @@ int conn_recv_packet(struct conn* conn,uint8_t *buf,int len)
|
||||
}
|
||||
|
||||
|
||||
/* yes, these functions could be better defined as macros in a .h file */
|
||||
|
||||
int conn_recv_packet(struct conn* conn,uint8_t *buf,int len)
|
||||
{
|
||||
return conn_recv_packet_(conn,buf,len,0);
|
||||
}
|
||||
|
||||
int conn_recv_packet_peek(struct conn* conn,uint8_t *buf,int len)
|
||||
{
|
||||
int rc = conn_recv_packet_(conn,buf,len,MSG_PEEK);
|
||||
return rc;
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user