--- a/Socket.st Thu Jun 02 18:22:02 1994 +0200
+++ b/Socket.st Thu Jun 02 19:20:18 1994 +0200
@@ -19,11 +19,8 @@
!
Socket comment:'
-
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
-
-$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.9 1994-06-02 11:36:14 claus Exp $
'!
%{
@@ -59,24 +56,47 @@
!Socket class methodsFor:'documentation'!
+copyright
+"
+ COPYRIGHT (c) 1992 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.10 1994-06-02 17:20:07 claus Exp $
+"
+!
+
documentation
"
- I provide access to sockets for interprocess communication.
+ This class provides access to (unix-)sockets for interprocess communication.
The message protocol is preliminary, until someone tells me how
- other smalltalks socket interface looks.
+ other smalltalk's socket interfaces look like.
Also, currently there is almost no support for other than IP
sockets - this will be added in the future.
Due to historic reasons (I started this class, before I got hold of some
code using ST-80 Sockets i.e. RemoteInvocation), there is some old interface
- still provided. This will vanish; use the newTCPxxx and newUDPxxx interface, which
- is meant to be compatible to ST-80's UnixSocketAccessor interface.
+ still provided. This will vanish; use the newTCPxxx and newUDPxxx interface,
+ which is meant to be compatible to ST-80's UnixSocketAccessor interface.
example (get help info from an nntp server):
|sock|
- sock := Socket newTCPclientToHost:(OperatingSystem getEnvironment:'NNTPSERVER') port:'nntp'.
+ sock := Socket
+ newTCPclientToHost:(OperatingSystem
+ getEnvironment:'NNTPSERVER')
+ port:'nntp'.
Transcript showCr:sock nextLine.
sock buffered:false.
@@ -90,11 +110,14 @@
] loopWithExit.
sock close
+
example (connect to an ftp server):
|sock|
- sock := Socket newTCPclientToHost:(OperatingSystem getHostName) port:'ftp'.
+ sock := Socket
+ newTCPclientToHost:(OperatingSystem getHostName)
+ port:'ftp'.
sock buffered:false.
Transcript showCr:sock nextLine.
@@ -105,7 +128,8 @@
sock nextPutAll:'LIST'; cr.
Transcript showCr:sock nextLine.
- "dont know enough of the ftp protocol by to continue here ..."
+ "dont know enough of the ftp protocol to continue here ..."
+
example (connect to an snmp server):
@@ -115,7 +139,6 @@
sock connectTo:(OperatingSystem getHostName).
sock buffered:false.
Transcript showCr:got it'.
-
"
! !