type bugfix: int -> sock_t