Calvin Rose
73989f5cc7
Consolidate windows and posix socket code.
...
Also remove code that ignored sigpipe and instead try
our best to ignore through various platform specific mechanisms.
2020-04-29 21:07:21 -05:00
Calvin Rose
c98e1f3cae
Update documentation for net/read and net/chunk.
2020-04-27 19:26:05 -05:00
Calvin Rose
41894eb285
Add docstrings to net.c
2020-04-26 14:11:47 -05:00
Calvin Rose
d2ebf4b52d
Merge branch 'net'
2020-04-26 12:27:37 -05:00
Calvin Rose
0d3c6abee8
POLLER -> POLLERR
2020-04-18 19:15:59 -04:00
Calvin Rose
4a693222b4
Port net code to windows.
...
Use winsock2 and WSAPoll. Not the most high performance
solution but should work well.
2020-04-18 19:14:38 -04:00
Calvin Rose
2904c19ed9
Switch to poll from select.
...
Simpler and more flexible interface, and also lets
us use epoll more easily on linux, which is the most important
plantform to optimize for network performance.
2020-04-18 15:22:20 -05:00
Calvin Rose
4ac382e553
Add alias JANET_SIGNAL_EVENT.
2020-04-17 16:27:02 -05:00
Calvin Rose
01a79dc965
Remove extra functionality.
2020-02-20 20:10:03 -06:00
Calvin Rose
0df220780a
Fix issues with #282
...
Bad handling of write errors, as well as janet_root_fiber().
2020-02-20 19:54:31 -06:00
Calvin Rose
f4a46ba6ea
Add methods to streams.
...
This makes streams polymorphic with files in many cases.
printf family functions still need porting.
2020-02-12 09:32:41 -06:00
Calvin Rose
79bb9e54d5
Remove direct references to file descriptors.
...
If a descriptor is freed by the Janet code, other
uses of that descriptor, say in the event loop, need
to know that it has been closed.
2020-02-11 08:57:44 -06:00
Calvin Rose
f4d7fd97f6
Working TCP echo server and client.
...
Required a few changes to APIs, namely janet_root_fiber()
to get topmost fiber that is active in the current scheduler.
This is distinct from janet_current_fiber(), which gets the bottom
most fiber in the fiber stack - it might have a parent, and so cannot
be reliably resumed.
This is the kind of situation that makes symmetric coroutines more
attractive.
2020-02-09 20:00:50 -06:00
Calvin Rose
eda61455d3
Work on tcp server code.
2020-02-03 09:29:51 -06:00
Calvin Rose
c0d2140d14
Begin net/ module in core.
...
Humble beginnings.
2020-02-01 20:39:54 -06:00