[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
TCP (or UDP) daytime client in Smalltalk
From: |
address@hidden |
Subject: |
TCP (or UDP) daytime client in Smalltalk |
Date: |
Thu, 28 May 2020 15:46:37 +0200 (CEST) |
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
- TCP (or UDP) daytime client in Smalltalk,
address@hidden <=