[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Re: Using Sockets

From: Stephen
Subject: Re: [Help-smalltalk] Re: Using Sockets
Date: Sun, 26 Dec 2010 12:15:19 +1300
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20101207 Thunderbird/3.1.7

Hi Aidan,

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

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

$ gst
"Global garbage collection... done"
Loading package Sockets
Loading package SUnit
Loading package NetClients
'220 ESMTP Postfix'

On 24/12/10 10:24 PM, Aidan Gauland wrote:
Aidan Gauland<aidalgol<at>>  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

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.


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]