mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 23:16:05 +00:00
Remove r_socket_*later() hacky methods
This commit is contained in:
parent
c8de9fe3a7
commit
488ea96089
@ -37,7 +37,6 @@ R_API int r_socket_connect (RSocket *s, const char *host, const char *port, int
|
||||
R_API int r_socket_unix_listen (RSocket *s, const char *file);
|
||||
#endif
|
||||
R_API int r_socket_close (RSocket *s);
|
||||
R_API int r_socket_close_later (RSocket *s);
|
||||
R_API int r_socket_free (RSocket *s);
|
||||
R_API int r_socket_listen (RSocket *s, const char *port, const char *certfile);
|
||||
R_API RSocket *r_socket_accept (RSocket *s);
|
||||
@ -84,6 +83,5 @@ typedef struct r_socket_http_request {
|
||||
R_API RSocketHTTPRequest *r_socket_http_accept (RSocket *s, int timeout);
|
||||
R_API void r_socket_http_response (RSocketHTTPRequest *rs, int code, const char *out, int x, const char *headers);
|
||||
R_API void r_socket_http_close (RSocketHTTPRequest *rs);
|
||||
R_API void r_socket_http_close_later (RSocketHTTPRequest *rs);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -73,18 +73,6 @@ R_API void r_socket_http_response (RSocketHTTPRequest *rs, int code, const char
|
||||
if (out && len>0) r_socket_write (rs->s, (void*)out, len);
|
||||
}
|
||||
|
||||
R_API void r_socket_http_close_later (RSocketHTTPRequest *rs) {
|
||||
#if __UNIX__
|
||||
if (!fork ()) {
|
||||
sleep (3);
|
||||
r_socket_http_close (rs);
|
||||
exit (0);
|
||||
}
|
||||
#else
|
||||
r_socket_http_close (rs);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* close client socket and free struct */
|
||||
R_API void r_socket_http_close (RSocketHTTPRequest *rs) {
|
||||
r_socket_free (rs->s);
|
||||
|
@ -230,20 +230,6 @@ R_API int r_socket_close (RSocket *s) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
R_API int r_socket_close_later (RSocket *s) {
|
||||
#if __UNIX__
|
||||
if (!fork ()) {
|
||||
sleep (3);
|
||||
r_socket_close (s);
|
||||
exit (0);
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
return r_socket_close (s);
|
||||
#endif
|
||||
return R_TRUE;
|
||||
}
|
||||
|
||||
R_API int r_socket_free (RSocket *s) {
|
||||
int res = r_socket_close (s);
|
||||
#if HAVE_LIB_SSL
|
||||
|
Loading…
Reference in New Issue
Block a user