TCP (or UDP) daytime client in Smalltalk

"[email protected]" <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
Hello,

I'm new to GNU Smalltalk but this package seems to compile (build) fine on Solaris 11.4 (Intel).

I think it compiled fine because 'gmake install' worked and I can enter some of the sample tutorial code snippets, and this works.

I've also created a Solaris IPS package for it (a binary package) so that it is easier to install.

# pkg list gst
NAME (PUBLISHER)                                  VERSION                    IFO
runtime/gst (nightly)                             3.2.91-11.4.24.0.0.71.0    i--

The above 'package' (pkg) is the package management system, so that the binary can be installed without configure+make install.

As a test, I would like to create a simple "TCP" or "UDP" daytime client in Smalltalk.

In Squeak (a different Smalltalk implementation) the following code works:

| r s addr |
addr := NetNameResolver addressFromString:'192.168.0.1'.
s := Socket newTCP connectTo:addr port:13.
r := s receiveData.
s close.
Transcript show:r.

When I try to evaluate the same code in gnu smalltalk:

$ gst
GNU Smalltalk ready

st> Smalltalk version
'GNU Smalltalk version 3.2.91'
st> | r s addr |
st> addr := NetNameResolver addressFromString:'192.168.0.1'.
Object: nil error: did not understand #addressFromString:
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
UndefinedObject(Object)>>doesNotUnderstand: #addressFromString: (SysExcept.st:1408)
UndefinedObject>>executeStatements (a String:1)
nil


Is there a way to load the NetNameResolver class in GNU smalltalk please ?

Or is there an example of TCP/IP (TCP or UDP) NetClient programming with gst ?

Thanks,
David Stes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.