-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add connect syscall * Add tcp socket device * Add socket.connect to lisp * Rewrite tcp command to use the syscalls * Rewrite http command to use the syscalls * Use socket#recv_slice instead of socket#recv * Move connect to net module * Refactor connect * Refactor code * Add listen syscall * Add accept * Add close to FileIO * Fix write loop * Add poll syscall * Rewrite socket command to use poll * Update console polling * Rename file handle to handle * Remove prompt option from socket * Make poll blocking with timeout and cancel * Add one byte status read * Remove poll blocking * Fix error when connect is followed directly by close * Change tcp and socket command arguments * Add sleep while polling without events * Speed up connection failure detection * Add back some verbose output * Fix socket listen * Split net files * Add UDP sockets * Refactor host command code * Move shared socket code to module * Use recommended buffer size in socket file size * Remove debug output * Fix fallback socket size * Update html doc * Update network screenshot * Update lisp manual
- Loading branch information
Showing
39 changed files
with
1,283 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,14 +61,14 @@ The `dhcp` command configures the network automatically: | |
The `host` command performs DNS lookups: | ||
|
||
> host example.com | ||
example.com has address 93.184.216.34 | ||
93.184.216.34 | ||
|
||
|
||
## TCP | ||
|
||
The `tcp` command connects to TCP sockets: | ||
|
||
> tcp time.nist.gov 13 --verbose | ||
> tcp time.nist.gov:13 --verbose | ||
DEBUG: Connecting to 129.6.15.30:13 | ||
|
||
58884 20-02-05 19:19:42 00 0 0 49.2 UTC(NIST) * | ||
|
@@ -101,18 +101,16 @@ like the `netcat` command on Unix. | |
|
||
For example the request made with `tcp` above is equivalent to this: | ||
|
||
> socket time.nist.gov 13 --read-only | ||
> socket time.nist.gov:13 --read-only | ||
|
||
59710 22-05-11 21:44:52 50 0 0 359.3 UTC(NIST) * | ||
|
||
And the request made with `http` is equivalent to that: | ||
|
||
> socket moros.cc 80 --prompt | ||
MOROS Socket v0.1.0 | ||
> socket moros.cc:80 | ||
GET /test.html HTTP/1.0 | ||
Host: moros.cc | ||
|
||
> GET /test.html HTTP/1.0 | ||
> Host: moros.cc | ||
> | ||
HTTP/1.1 200 OK | ||
Server: nginx | ||
Date: Wed, 11 May 2022 21:46:34 GMT | ||
|
@@ -136,27 +134,24 @@ And the request made with `http` is equivalent to that: | |
|
||
Here's a connexion to a SMTP server to send a mail: | ||
|
||
> socket 10.0.2.2 2500 --prompt | ||
MOROS Socket v0.1.0 | ||
|
||
> socket 10.0.2.2:2500 | ||
220 EventMachine SMTP Server | ||
> EHLO moros.cc | ||
HELO moros.cc | ||
250-Ok EventMachine SMTP Server | ||
250-NO-SOLICITING | ||
250 SIZE 20000000 | ||
> MAIL FROM:<[email protected]> | ||
> RCPT TO:<[email protected]> | ||
MAIL FROM:<[email protected]> | ||
250 Ok | ||
RCPT TO:<[email protected]> | ||
250 Ok | ||
> DATA | ||
DATA | ||
354 Send it | ||
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nec | ||
> diam vitae ex blandit malesuada nec a turpis. | ||
> . | ||
> QUIT | ||
Subject: Test | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nec | ||
diam vitae ex blandit malesuada nec a turpis. | ||
. | ||
250 Message accepted | ||
QUIT | ||
221 Ok | ||
|
||
Sending a file to a server: | ||
|
||
> socket 10.0.2.2 1234 <= /tmp/alice.txt | ||
> socket 10.0.2.2:1234 <= /tmp/alice.txt |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.