RegressionTests__ServerSocketTest.st
changeset 1447 2351db93aa5b
parent 1083 e78bdd5e06ae
child 1500 d406a10b2965
child 2255 42ec9dc9e1e4
equal deleted inserted replaced
1446:c3b09cef9f87 1447:2351db93aa5b
     1 "{ Package: 'exept:regression' }"
     1 "{ Package: 'stx:goodies/regression' }"
     2 
     2 
     3 "{ NameSpace: RegressionTests }"
     3 "{ NameSpace: RegressionTests }"
     4 
     4 
     5 TestCase subclass:#ServerSocketTest
     5 TestCase subclass:#ServerSocketTest
     6 	instanceVariableNames:''
     6 	instanceVariableNames:''
    14 documentation
    14 documentation
    15 "
    15 "
    16     documentation to be added.
    16     documentation to be added.
    17 
    17 
    18     [author:]
    18     [author:]
    19         james (james@CHANTI)
    19 	james (james@CHANTI)
    20 
    20 
    21     [instance variables:]
    21     [instance variables:]
    22 
    22 
    23     [class variables:]
    23     [class variables:]
    24 
    24 
    55     serverListenSocket := Socket newTCPserverAtPort:9998.
    55     serverListenSocket := Socket newTCPserverAtPort:9998.
    56     self assert:serverListenSocket notNil.
    56     self assert:serverListenSocket notNil.
    57     serverListenSocket listenFor:1.
    57     serverListenSocket listenFor:1.
    58 
    58 
    59     clientSocket := Socket newTCPclientToHost:'localhost' port:9998.
    59     clientSocket := Socket newTCPclientToHost:'localhost' port:9998.
    60     self assert:clientSocket notNil. 
    60     self assert:clientSocket notNil.
    61     clientSocket buffered:false.
    61     clientSocket buffered:false.
    62     Transcript showCR:'client: socket connected it'.
    62     Transcript showCR:'client: socket connected it'.
    63     'can now do transfer via sock'.
    63     'can now do transfer via sock'.
    64     Transcript showCR:'sending <hello>'.
    64     Transcript showCR:'sending <hello>'.
    65     clientSocket nextPutLine:'hello'.
    65     clientSocket nextPutLine:'hello'.
    70 
    70 
    71     clientSocket close.
    71     clientSocket close.
    72     serverSocket close.
    72     serverSocket close.
    73     serverListenSocket close.
    73     serverListenSocket close.
    74 
    74 
    75         
    75 
    76 
    76 
    77     "
    77     "
    78      self run:#test1
    78      self run:#test1
    79      self new test1
    79      self new test1
    80     "
    80     "