Back: TCP package Up: TCP package Forward: TCP.AbstractSocket class-defaults   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

6.1 TCP.AbstractSocket

Defined in namespace TCP
Superclass: Stream
Category: Sockets-Streams

6.1.1 TCP.AbstractSocket class: defaults  (class)
6.1.2 TCP.AbstractSocket class: instance creation  (class)
6.1.3 TCP.AbstractSocket class: timed-out operations  (class)
6.1.4 TCP.AbstractSocket: accessing  (instance)
6.1.5 TCP.AbstractSocket: printing  (instance)
6.1.6 TCP.AbstractSocket: socket options  (instance)
6.1.7 TCP.AbstractSocket: stream protocol  (instance)
6.1.8 TCP.AbstractSocket: testing  (instance)


6.1.1 TCP.AbstractSocket class: defaults

defaultAddressClass
Answer the default address family to be used. In the library, the address family is represented by a subclass of SocketAddress which is by default IPAddress.

defaultAddressClass: class
Set the default address family to be used. In the library, the address family is represented by a subclass of SocketAddress which is by default IPAddress.

defaultImplementationClass
Answer the default implementation class. Depending on the subclass, this might be the default stream socket implementation class of the default address class, or rather its default datagram socket implementation class


6.1.2 TCP.AbstractSocket class: instance creation

new
This method should not be called for instances of this class.

new: implementation
Answer a new instance of the receiver, using as the underlying layer the object passed as the `implementation' parameter; the object is probably going to be some kind of AbstractSocketImpl.


6.1.3 TCP.AbstractSocket class: timed-out operations

checkPeriod
Answer the period that is to elapse between socket polls if data data is not ready and the connection is still open (in milliseconds)

checkPeriod: anInteger
Set the period that is to elapse between socket polls if data data is not ready and the connection is still open (in milliseconds)

timeout
Answer the period that is to elapse between the request for (yet unavailable) data and the moment when the connection is considered dead (in milliseconds)

timeout: anInteger
Set the period that is to elapse between the request for (yet unavailable) data and the moment when the connection is considered dead (in milliseconds)


6.1.4 TCP.AbstractSocket: accessing

address
Answer an IP address that is of common interest (this can be either the local or the remote address, according to the definition in the subclass).

available
Answer whether there is data available on the socket. Same as #canRead, present for backwards compatibility.

canRead
Answer whether there is data available on the socket.

canWrite
Answer whether there is free space in the socket's write buffer.

close
Close the socket represented by the receiver.

flush
Flush any buffers used by the receiver.

isOpen
Answer whether the connection between the receiver and the remote endpoint is still alive.

isPeerAlive
Answer whether the connection with the peer remote machine is still valid.

localAddress
Answer the local IP address of the socket.

localPort
Answer the local IP port of the socket.

port
Answer an IP port that is of common interest (this can be the port for either the local or remote endpoint, according to the definitions in the subclass

remoteAddress
Answer the IP address of the socket's remote endpoint.

remotePort
Answer the IP port of the socket's remote endpoint.


6.1.5 TCP.AbstractSocket: printing

printOn: aStream
Print a representation of the receiver on aStream


6.1.6 TCP.AbstractSocket: socket options

soLinger
Answer the number of seconds that the socket is allowed to wait if it promises reliable delivery but has unacknowledged/untransmitted packets when it is closed, or nil if those packets are left to their destiny or discarded.

soLinger: linger
Set the number of seconds that the socket is allowed to wait if it promises reliable delivery but has unacknowledged/untransmitted packets when it is closed.

soLingerOff
Specify that, even if the socket promises reliable delivery, any packets that are unacknowledged/untransmitted when it is closed are to be left to their destiny or discarded.

species
Answer `String'.


6.1.7 TCP.AbstractSocket: stream protocol

atEnd
By default, answer whether the connection is still open.

next
Read another character from the socket, failing if the connection is dead.

next: n putAll: aCollection startingAt: pos
Write `char' to the socket, failing if the connection is dead. The SIGPIPE signal is automatically caught and ignored by the system.

nextPut: char
Write `char' to the socket, failing if the connection is dead. The SIGPIPE signal is automatically caught and ignored by the system.


6.1.8 TCP.AbstractSocket: testing

isExternalStream
Answer whether the receiver streams on a file or socket.



Back: TCP.AbstractSocket-stream protocol Up: TCP.AbstractSocket Forward: TCP.AbstractSocketImpl   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on May, 22 2008 using texi2html