| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've been working on this slowly over several weeks, but it's too hard
to support 0 as the null value for addresses. I constantly have to add
exceptions for scalar value corresponding to an address type (now
occupying 2 locations). The final straw is the test for 'reload':
x:num <- reload text
'reload' returns an address. But there's no way to know that for
arbitrary instructions.
New plan: let's put this off for a bit and first create support for
literals. Then use 'null' instead of '0' for addresses everywhere. Then
it'll be easy to just change what 'null' means.
|
| |
|
|
|
|
|
| |
Simplify primitive interface to read from a socket: now returns just a
single character.
|
|
|
|
|
|
|
| |
Required fixing an off-by-one error.
(Not bothering writing a test for this since I'm hoping to simplify
$read-from-socket to always return a single character..)
|
|
|
|
|
| |
Fix for that annoying popup from the Mac OS firewall: inside tests keep
any opened ports accessible only to localhost.
|
|
|
|
| |
Make sure we clear the socket variable after closing it.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fix CI. 3 different memory leaks in the socket internals.
The hard one was recognizing the need for
`receive-from-client-socket-and-close`.
|
| |
|
|
|
|
| |
Its interface now mirrors that of 'read-event'.
|
| |
|
|
|
|
| |
Fix CI. Revert accidentally-added files.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
In the process I've also altered the API of $read-from-socket to return
a boolean (eof?) rather than the number of bytes read (which is implicit
in the length of the returned array).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Clean up a memory leak and a couple of other things.
|
|
|
|
|
| |
Wrap $read-from-socket in a channel and fix the socket example
so that browser's display the response properly.
|
|
|
|
|
|
|
| |
$write-to-socket, $read-from-socket, and $accept now pass around
references to socket pointers.
$read-from-socket handles EOF explicitly.
|
|
|
|
| |
Fix a warning on some compilers.
|
|
Includes four Mu functions:
- $socket: Creates the C structure for a socket and tries to bind and
listen on a user-provided port.
- $accept: Returns a number pointer to a new socket session. Should
be called with the result of $socket.
- $read-from-socket: Read one character from the socket, passed in
as a Mu number. Should only be called after calling $socket and
$accept.
- $close-socket: Takes two parameters, one for the result of $socket
and one for the result of $accept, closing both sockets
and releasing bound ports.
|