sockets: remove unused functions

FossilOrigin-Name: a16fb2e19a79204791ef32fd3589ce9aa92f95c8834191bf950144fc0c38cd55
This commit is contained in:
crc 2022-04-26 12:00:20 +00:00
parent 8c8f5ec25e
commit e1d595d9bf
3 changed files with 7 additions and 14 deletions

View file

@ -75,14 +75,14 @@ a maxmimum number of bytes to read, and a socket id. It returns
the number of bytes received and an error code.
~~~
:socket:recv (ann-nn) #8 socket:operation ;
:socket:recv (ann-nn) #7 socket:operation ;
~~~
`socket:close` is a wrapper over close(2). It takes a socket id
and closes the socket.
~~~
:socket:close (n-) #10 socket:operation ;
:socket:close (n-) #8 socket:operation ;
~~~
`socket:configure` is used before `socket:bind` to set some
@ -90,5 +90,5 @@ internal state. Takes the host name and port, both as strings.
Does not return anything.
~~~
:socket:configure (ss-) #11 socket:operation ;
:socket:configure (ss-) #9 socket:operation ;
~~~

View file

@ -809,10 +809,10 @@ CELL ngaImage[] = { 1793,17808,18254,18298,202207,410,382,1230,1535,0,10,1,10,2,
116,58,97,99,99,101,112,116,0,1,4,2049,15624,10,15889,15933,166,0,0,115,
111,99,107,101,116,58,99,111,110,110,101,99,116,0,1,5,2049,15624,10,15913,
15955,166,0,0,115,111,99,107,101,116,58,115,101,110,100,0,1,6,2049,15624,
10,15938,15977,166,0,0,115,111,99,107,101,116,58,114,101,99,118,0,1,8,
10,15938,15977,166,0,0,115,111,99,107,101,116,58,114,101,99,118,0,1,7,
2049,15624,10,15960,16000,166,0,0,115,111,99,107,101,116,58,99,108,111,115,101,
0,1,10,2049,15624,10,15982,16027,166,0,0,115,111,99,107,101,116,58,99,111,
110,102,105,103,117,114,101,0,1,11,2049,15624,10,114,101,116,114,111,46,102,
0,1,8,2049,15624,10,15982,16027,166,0,0,115,111,99,107,101,116,58,99,111,
110,102,105,103,117,114,101,0,1,9,2049,15624,10,114,101,116,114,111,46,102,
111,114,116,104,0,16005,16057,166,16226,0,105,111,58,99,111,114,101,0,1,8000,
2049,10610,2049,10591,10,16044,16079,166,16226,0,99,111,114,101,58,105,110,105,116,0,
1,0,2049,16057,10,16064,16100,166,16226,0,99,111,114,101,58,115,116,97,114,116,

View file

@ -1239,9 +1239,6 @@ void socket_send(NgaState *vm) {
stack_push(vm, errno);
}
void socket_sendto(NgaState *vm) {
}
void socket_recv(NgaState *vm) {
char buf[8193];
int sock = stack_pop(vm);
@ -1254,9 +1251,6 @@ void socket_recv(NgaState *vm) {
stack_push(vm, errno);
}
void socket_recvfrom(NgaState *vm) {
}
void socket_close(NgaState *vm) {
int sock = stack_pop(vm);
close(SocketID[sock]);
@ -1267,8 +1261,7 @@ Handler SocketActions[] = {
socket_get_host,
socket_create, socket_bind, socket_listen,
socket_accept, socket_connect, socket_send,
socket_sendto, socket_recv, socket_recvfrom,
socket_close, socket_getaddrinfo
socket_recv, socket_close, socket_getaddrinfo
};
void io_socket(NgaState *vm) {