Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
static char c[1024];
int n = read(*recv, c, 1024);
if(n < 0) {
static char c[1024];
int n = read(*recv, c, 1024);
if(n < 0) {
return NativeString_to_s_with_length("",0);
}
char* ret = malloc(n + 1);
memcpy(ret, c, n);
ret[n] = '\0';
return NativeString_to_s_with_length("",0);
}
char* ret = malloc(n + 1);
memcpy(ret, c, n);
ret[n] = '\0';
return NativeString_to_s_with_length(ret, n);
`}
return NativeString_to_s_with_length(ret, n);
`}