2533 |
if (out) cannot_write(strm); |
if (out) cannot_write(strm); |
2534 |
break; |
break; |
2535 |
case smm_io: |
case smm_io: |
2536 |
/* case smm_socket: */ |
/* case smm_socket: */ |
2537 |
break; |
break; |
2538 |
|
|
2539 |
default: |
default: |
2706 |
maccept(object x) { |
maccept(object x) { |
2707 |
|
|
2708 |
int fd; |
int fd; |
|
unsigned n; |
|
2709 |
struct sockaddr_in addr; |
struct sockaddr_in addr; |
2710 |
|
unsigned n=sizeof(addr); |
2711 |
object server,host,port; |
object server,host,port; |
2712 |
|
|
2713 |
if (type_of(x) != t_stream) |
if (type_of(x) != t_stream) |
2714 |
FEerror("~S is not a steam~%",1,x); |
FEerror("~S is not a steam~%",1,x); |
2715 |
if (x->sm.sm_mode!=smm_two_way) |
if (x->sm.sm_mode!=smm_two_way) |
2716 |
FEerror("~S is not a two-way steam~%",1,x); |
FEerror("~S is not a two-way steam~%",1,x); |
2717 |
|
memset(&addr,0,sizeof(addr)); |
2718 |
fd=accept(SOCKET_STREAM_FD(STREAM_INPUT_STREAM(x)),(struct sockaddr *)&addr, &n); |
fd=accept(SOCKET_STREAM_FD(STREAM_INPUT_STREAM(x)),(struct sockaddr *)&addr, &n); |
2719 |
if (fd <0) { |
if (fd <0) { |
2720 |
FEerror("Error ~S on accepting connection to ~S~%",2,make_simple_string(strerror(errno)),x); |
FEerror("Error ~S on accepting connection to ~S~%",2,make_simple_string(strerror(errno)),x); |