Back: Sockets.ServerSocket-initializing Up: Sockets package Forward: Sockets.Socket class-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

6.19 Sockets.Socket

Defined in namespace Sockets
Superclass: Sockets.StreamSocket
Category: Sockets-Streams

This class adds read and write buffers to the basic model of AbstractSocket.

6.19.1 Sockets.Socket class: accessing  (class)
6.19.2 Sockets.Socket class: tests  (class)
6.19.3 Sockets.Socket class: well known ports  (class)
6.19.4 Sockets.Socket: stream protocol  (instance)


6.19.1 Sockets.Socket class: accessing

writeBufferSize
Answer the size of the write buffer for newly-created sockets

writeBufferSize: anInteger
Set the size of the write buffer for newly-created sockets


6.19.2 Sockets.Socket class: tests

datagramLoopbackTest
Send data from one datagram socket to another on the local machine. Tests most of the socket primitives and works with different processes.

datagramLoopbackTestOn: addressClass
Send data from one datagram socket to another on the local machine. Tests most of the socket primitives and works with different processes.

loopbackTest
Send data from one socket to another on the local machine. Tests most of the socket primitives.

loopbackTest: bufferSizes
Send data from one socket to another on the local machine. Tests most of the socket primitives. The parameter is the size of the input and output buffer sizes.

loopbackTest: bufferSizes addressClass: addressClass
Send data from one socket to another on the local machine. Tests most of the socket primitives. The parameters are the size of the input and output buffer sizes, and the address class (family) to use.

loopbackTestOn: addressClass
Send data from one socket to another on the local machine. Tests most of the socket primitives. The parameter is the address class (family) to use.

microTest
Extremely small test (try to receive SMTP header)

producerConsumerTest
Send data from one datagram socket to another on the local machine. Tests most of the socket primitives and works with different processes.

producerConsumerTestOn: addressClass
Send data from one socket to another on the local machine. Tests most of the socket primitives and works with different processes.

sendTest
Send data to the 'discard' socket of localhost.

sendTest: host
Send data to the 'discard' socket of the given host. Tests the speed of one-way data transfers across the network to the given host. Note that many hosts do not run a discard server.

testPort2For: anAddressClass
Not commented.

testPortFor: anAddressClass
Not commented.

tweakedLoopbackTest
Send data from one socket to another on the local machine, trying to avoid buffering overhead. Tests most of the socket primitives. Comparison of the results of loopbackTest and tweakedLoopbackTest should give a measure of the overhead of buffering when sending/receiving large quantities of data.


6.19.3 Sockets.Socket class: well known ports

initialize
Initialize the receiver's defaults


6.19.4 Sockets.Socket: stream protocol

canWrite
Answer whether more data is available in the socket's read buffer or from the operating system.

ensureWriteable
Answer whether more data is available in the socket's read buffer or from the operating system.

flush
Flush the write buffer to the operating system

next: n putAll: aCollection startingAt: pos
Write aString to the socket; this acts as a bit-bucket when the socket is closed. This might yield control to other Smalltalk Processes.

nextPut: char
Write a character to the socket; this acts as a bit-bucket when the socket is closed. This might yield control to other Smalltalk Processes.

writeBufferSize: size
Create a new write buffer of the given size, flushing the old one is needed. This might yield control to other Smalltalk Processes.



Back: Sockets.Socket class-well known ports Up: Sockets.Socket Forward: Sockets.SocketAddress   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on July, 23 2009 using texi2html