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

6.4 TCP.DatagramSocket

Defined in namespace TCP
Superclass: TCP.AbstractSocket
Category: Sockets-Streams

6.4.1 TCP.DatagramSocket class: accessing  (class)
6.4.2 TCP.DatagramSocket class: initialization  (class)
6.4.3 TCP.DatagramSocket class: instance creation  (class)
6.4.4 TCP.DatagramSocket: accessing  (instance)
6.4.5 TCP.DatagramSocket: direct operations  (instance)


6.4.1 TCP.DatagramSocket class: accessing

defaultBufferSize
Answer the default maximum size for input datagrams.

defaultBufferSize: size
Set the default maximum size for input datagrams.

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.4.2 TCP.DatagramSocket class: initialization

initialize
Initialize the class to use an input datagram size of 128.


6.4.3 TCP.DatagramSocket class: instance creation

local: ipAddressOrString port: remotePort
Create a new socket and bind it to the given host (passed as a String to be resolved or as an IPAddress), on the given port.

new
Answer a new datagram socket (by default an UDP socket), without a specified local address and port.

port: localPort
Create a new socket and bind it to the local host on the given port.

remote: ipAddressOrString port: remotePort local: ipAddress port: localPort
Create a new socket and bind it to the given host (passed as a String to be resolved or as an IPAddress), and to the given remotePort. The default destination for the datagrams will be ipAddressOrString (if not nil), on the remotePort port.


6.4.4 TCP.DatagramSocket: accessing

address
Answer the local address.

bufferSize
Answer the size of the buffer in which datagrams are stored.

bufferSize: size
Set the size of the buffer in which datagrams are stored.

next
Read a datagram on the socket and answer it.

nextPut: aDatagram
Send the given datagram on the socket.

peek
Peek for a datagram on the socket and answer it.

peek: datagram
Peek for a datagram on the socket, store it in `datagram', and answer the datagram itself.

port
Answer the local port.

receive: datagram
Read a datagram from the socket, store it in `datagram', and answer the datagram itself.


6.4.5 TCP.DatagramSocket: direct operations

nextFrom: ipAddress port: port
Answer the next datagram from the given address and port.



Back: TCP.DatagramSocket-accessing Up: TCP.DatagramSocket Forward: TCP.DatagramSocketImpl   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