Back to the future
Aug 13, 2013 7:00:40 GMT 1
Post by Deleted on Aug 13, 2013 7:00:40 GMT 1
Peter,
Does this bring back any memories? Simple Socket
I compiled the ssocket.so ScriptBasic extension module under Android Linux and gave the DAYTIME script a try.
Status of the project.
The current status is 'WORK IN PROGRESS'. This means that I still am changing functionality and adding more functionality.
I already have a couple ideas how your ssocket library can be used. Thanks again for all the great code gifts over the years.
Does this bring back any memories? Simple Socket
I compiled the ssocket.so ScriptBasic extension module under Android Linux and gave the DAYTIME script a try.
REM *********************************************************************************************
REM *
REM * Program to read a DAYTIME server at TCP port 13
REM *
REM * Target OS: Linux / Win32
REM *
REM * (c) November 2002 Peter van Eerten
REM *
REM *********************************************************************************************
REM *
REM * Below you will find public time servers. Use any of these to test the
REM * program, or install your own timeserver with inetd.
REM *
REM * See also http://www.boulder.nist.gov/timefreq/service/time-servers.html
REM *
REM * time-a.nist.gov 129.6.15.28 NIST, Gaithersburg, Maryland
REM * time-b.nist.gov 129.6.15.29 NIST, Gaithersburg, Maryland
REM * time-a.timefreq.bldrdoc.gov 132.163.4.101 NIST, Boulder, Colorado
REM * time-b.timefreq.bldrdoc.gov 132.163.4.102 NIST, Boulder, Colorado
REM * time-c.timefreq.bldrdoc.gov 132.163.4.103 NIST, Boulder, Colorado
REM * utcnist.colorado.edu 128.138.140.44 University of Colorado, Boulder
REM * time.nist.gov 192.43.244.18 NCAR, Boulder, Colorado
REM * time-nw.nist.gov 131.107.1.10 Microsoft, Redmond, Washington
REM * nist1.datum.com 63.149.208.50 Datum, San Jose, California
REM * nist1-dc.glassey.com 216.200.93.8 Abovenet, Virginia
REM * nist1-ny.glassey.com 208.184.49.9 Abovenet, New York City
REM * nist1-sj.glassey.com 207.126.103.204 Abovenet, San Jose, California
REM * nist1.aol-ca.truetime.com 207.200.81.113 TrueTime, AOL facility, Sunnyvale, California
REM * nist1.aol-va.truetime.com 205.188.185.33 TrueTime, AOL facility, Virginia
REM *
REM *********************************************************************************************
IMPORT ssocket.bas
ssocket::version()
REM Initialize
serveraddress = "time-a.timefreq.bldrdoc.gov"
serverport = 13
PRINT "\nDemonstrate Scriptbasic using the Simple Sockets library.\n"
PRINT "\nTrying to retrieve DAYTIME from " & serveraddress & " at port " & serverport & ":\n\n"
REM Make connection to the timeserver
retrieve = ssocket::connect(serveraddress, serverport)
REM Get result
result$ = ssocket::read(retrieve, SS_STREAM)
REM Print result or error on the console
IF LEFT(result$, 19) = "SIMPLE SOCKET ERROR" THEN
PRINT "Could not retrieve DAYTIME.\n"
ELSE
PRINT "---> retrieved time: ", result$, "\n"
END IF
Status of the project.
The current status is 'WORK IN PROGRESS'. This means that I still am changing functionality and adding more functionality.
I already have a couple ideas how your ssocket library can be used. Thanks again for all the great code gifts over the years.