socket :: NativeSocket :: socket
# Create a new C socket
new socket(domain: NativeSocketAddressFamilies, socketType: NativeSocketTypes, protocol: NativeSocketProtocolFamilies) `{
int ds = socket(domain, socketType, protocol);
if(ds == -1){
return NULL;
}
int *d = malloc(sizeof(int));
memcpy(d, &ds, sizeof(ds));
return d;
`}
lib/socket/socket_c.nit:111,2--120,3