Hi Aidan,

If you have a mailserver running locally, here is some simple sockets code to access the response from it.

$ cat gst31_sockettest.st
#!/usr/bin/gst -f
       PackageLoader fileInPackage: 'NetClients'.
       s := Sockets.Socket remote: '127.0.0.1' port: 25.
       (s upTo: Character cr) printNl.
       s close.

$ gst gst31_sockettest.st
"Global garbage collection... done"
Loading package Sockets
Loading package SUnit
Loading package NetClients
'220 mailserver.ourdomain.com ESMTP Postfix'

Regards
Stephen
On 24/12/10 10:24 PM, Aidan Gauland wrote:
Aidan Gauland<aidalgol<at>  no8wireless.co.nz>  writes:
gnu-smalltalk-el from sid did not load properly, so I chose to build
GST 3.2.3.  My socket code no longer crashes gst.  Thank you very
much!

Claimed victory too soon.  It doesn't crash, but I have no idea what
I'm doing.  I think I once figured out how to create send a string
over a TCP connection in Squeak, but I hadn't a clue what I was doing.
I was just hacking Smalltalk in highschool when I was bored.  I've
done a little with sockets in C, but only going through tutorials.

Could someone please give me an example of using Sockets in Smalltalk
for client-side stuff (or better yet, put it on the wiki)?  There are
a few decent *server* examples on the wiki, but no Smalltalk client as
counterparts for them.

--Aidan

P.S. I ultimately want to write an IRC bot in Smalltalk, because I
don't much fancy the available IRC bots and the languages for which
IRC libraries are available.



_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk




_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to