rre/unix: begin stubs for sockets support

FossilOrigin-Name: 291eea497cdbded9aacc36a71e51c2fbbd511727c931edf5215bdc3a82c3d806
This commit is contained in:
crc 2019-06-05 20:19:13 +00:00
parent 2c21a9b976
commit 0211ec6326
2 changed files with 56 additions and 4 deletions

View file

@ -466,7 +466,7 @@ int32_t ngaImage[] = { 1793,16271,16411,16453,201912,0,10,1,10,2,10,3,10,4,10,5,
2049,8134,2049,9200,10,1,9252,2049,3111,10,9230,9285,147,97,58,101,110,100,115,45,
119,105,116,104,63,0,1,3,1793,9301,2,2049,7204,1,13,2049,2076,2049,8179,2049,
9200,10,1,9289,2049,3111,10,9269,9312,134,76,80,0,0,9306,9322,134,73,110,100,
101,120,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
101,120,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

View file

@ -50,7 +50,7 @@
#define D_OFFSET_CLASS 2
#define D_OFFSET_NAME 3
#define NUM_DEVICES 7 /* Set the number of I/O devices */
#define NUM_DEVICES 8 /* Set the number of I/O devices */
#define MAX_OPEN_FILES 128
@ -99,6 +99,9 @@ void io_scripting_query();
void io_image();
void io_image_query();
void io_socket();
void query_socket();
size_t bsd_strlcat(char *dst, const char *src, size_t dsize);
size_t bsd_strlcpy(char *dst, const char *src, size_t dsize);
@ -116,7 +119,8 @@ Handler IO_deviceHandlers[NUM_DEVICES + 1] = {
io_floatingpoint_handler,
io_scripting_handler,
io_unix_handler,
io_image
io_image,
io_socket
};
Handler IO_queryHandlers[NUM_DEVICES + 1] = {
@ -126,7 +130,8 @@ Handler IO_queryHandlers[NUM_DEVICES + 1] = {
io_floatingpoint_query,
io_scripting_query,
io_unix_query,
io_image_query
io_image_query,
query_socket
};
@ -1285,6 +1290,53 @@ void io_unix_handler() {
}
/*=====================================================================*/
/*---------------------------------------------------------------------
BSD Sockets
---------------------------------------------------------------------*/
int Sockets[16];
void socket_create() {
}
void socket_bind() {
}
void socket_listen() {
}
void socket_accept() {
}
void socket_connect() {
}
void socket_send() {
}
void socket_sendto() {
}
void socket_recv() {
}
void socket_recvfrom() {
}
void socket_close() {
}
void io_socket() {
stack_pop();
}
void query_socket() {
stack_push(0);
stack_push(7);
}
/*=====================================================================*/