1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# Commands tested in this file: socket.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: tlsIO.test,v 1.14 2000/06/08 00:06:40 aborr Exp $
# Running socket tests with a remote server:
# ------------------------------------------
#
# Some tests in socket.test depend on the existence of a remote server to
# which they connect. The remote server must be an instance of tcltest and it
# must run the script found in the file "remote.tcl" in this directory. You
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# Commands tested in this file: socket.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: tlsIO.test,v 1.14.2.2 2000/07/12 01:54:03 hobbs Exp $
# Running socket tests with a remote server:
# ------------------------------------------
#
# Some tests in socket.test depend on the existence of a remote server to
# which they connect. The remote server must be an instance of tcltest and it
# must run the script found in the file "remote.tcl" in this directory. You
|
︙ | | | ︙ | |
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
|
set f [open script w]
puts $f {
package require tls
set timer [after 2000 "set x done"]
}
puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8829 \]"
puts $f {
proc accept {file addr port} {
global x
puts "[gets $file] $port"
close $file
set x done
}
puts ready
vwait x
after cancel $timer
close $f
}
|
|
|
|
|
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
|
set f [open script w]
puts $f {
package require tls
set timer [after 2000 "set x done"]
}
puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8829 \]"
puts $f {
proc accept {sock addr port} {
global x
puts "[gets $sock] $port"
close $sock
set x done
}
puts ready
vwait x
after cancel $timer
close $f
}
|
︙ | | | ︙ | |
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
|
set f [open script w]
puts $f {
package require tls
set timer [after 2000 "set x done"]
}
puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8830 \]"
puts $f {
proc accept {file addr port} {
global x
puts "[gets $file] $addr"
close $file
set x done
}
puts ready
vwait x
after cancel $timer
close $f
}
|
|
|
|
|
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
|
set f [open script w]
puts $f {
package require tls
set timer [after 2000 "set x done"]
}
puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8830 \]"
puts $f {
proc accept {sock addr port} {
global x
puts "[gets $sock] $addr"
close $sock
set x done
}
puts ready
vwait x
after cancel $timer
close $f
}
|
︙ | | | ︙ | |
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
set f [open script w]
puts $f {
package require tls
set timer [after 2000 "set x done"]
}
puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey -myaddr [info hostname] 8831 \]"
puts $f {
proc accept {file addr port} {
global x
puts "[gets $file]"
close $file
set x done
}
puts ready
vwait x
after cancel $timer
close $f
}
|
|
|
|
|
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
set f [open script w]
puts $f {
package require tls
set timer [after 2000 "set x done"]
}
puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey -myaddr [info hostname] 8831 \]"
puts $f {
proc accept {sock addr port} {
global x
puts "[gets $sock]"
close $sock
set x done
}
puts ready
vwait x
after cancel $timer
close $f
}
|
︙ | | | ︙ | |
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
|
set f [open script w]
puts $f {
package require tls
set timer [after 2000 "set x done"]
}
puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8832 \]"
puts $f {
proc accept {file addr port} {
global x
puts "[gets $file]"
close $file
set x done
}
puts ready
vwait x
after cancel $timer
close $f
}
|
|
|
|
|
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
|
set f [open script w]
puts $f {
package require tls
set timer [after 2000 "set x done"]
}
puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8832 \]"
puts $f {
proc accept {sock addr port} {
global x
puts "[gets $sock]"
close $sock
set x done
}
puts ready
vwait x
after cancel $timer
close $f
}
|
︙ | | | ︙ | |