Does anyone know of some tutorial, that could explain how the Socket Server etc. in Self works. Is there a Socket object in Self ??
Any help will be appreciated
Gustav W.
gulle@daimi.au.dk wrote:
Does anyone know of some tutorial, that could explain how the Socket Server etc. in Self works. Is there a Socket object in Self ??
The same unixFile objects that are used for normal files can be used for sockets as well:
| acceptor. action |
acceptor: unixFile openTCPListenerOnPort: 8080. [ action: acceptor acceptConnection. action write:
'<html> <header> <title>Not Implemented Yet</title> </header> <body> <h1>Try Again When I Have Finished This Software!</h1> </body> </html>'.
action close ] loop
Now try to aim your web browser at the machine you are running this on, port 8080.
Not quite a working web server, but I how this gives you and idea of how simple it is.
-- Jecel
self-interest@lists.selflanguage.org