- Inherits from:
- Object
- Declared in:
- DUDPClient.h
Object
|
+---DUDPClient
Class Description
The DUDPClient class implements a number of methods for using an UDP client.
- Last modified:
- 27-Feb-2005 (DUDPClient.h)
Instance Variables
- private DSocket *_local
- the local socket
- private int _sendFlag
- the send flags (def. 0)
- private int _recvFlag
- the receive flags (def. 0)
- private BOOL _started
- is the client started ?
- Constructors
- - (DUDPClient *) init
- Initialise the UDP Client
- Returns:
- the object
- - (DUDPClient *) init :(int) family :(int) protocol
- Initialise the UDP Client for a family and protocol
- Parameters:
- family - the family (DSA_AF_INET,DSA_AF_UNIX,DSA_AF_INET6)
protocol - the protocol to be used
- Returns:
- the object
- Deconstructor
- - free
- Free the UDP client object
- Returns:
- the object
- Copy related methods
- - deepen
- Deepen the object (not implemented)
- Member methods
- - (int) recvFlag
- Return the receive flag
- Returns:
- the receive flag
- - (DUDPClient *) recvFlag :(int) flag
- Set the receive flag
- Parameters:
- flag - the receive flag
- Returns:
- the object
- - (int) sendFlag
- Return the send flag
- Returns:
- the send flag
- - (DUDPClient *) sendFlag :(int) flag
- Set the send flag
- Parameters:
- flag - the send flag
- Returns:
- the object
- - (DSocket *) socket
- Return the local socket
- Returns:
- a reference to the socket object
- Main methods
- - (DData *) doRequest :(id <DSocketAddressable>) server :(const unsigned char *) request :(unsigned) length :(unsigned) respLength
- Send a request to a server and wait for a response (using send-
and recvFlag)
- Parameters:
- server - the address of the server
request - the request to be sent
length - the length of the request
respLength - the (maximum) length of the response
- Returns:
- a (new) data object with the response (or nil for error)
- - (BOOL) open :(int) family :(int) protocol
- Open the UDP client
- Parameters:
- family - the family (DSA_AF_INET,DSA_AF_UNIX,DSA_AF_INET6)
protocol - the protocol to be used
- Returns:
- success
- - (BOOL) start :(id <DSocketAddressable>) address
- Start the communication
- Parameters:
- address - the local address of the client
- Returns:
- success
- - (void) stop
- Stop the communication
- Returns:
- none
generated 08-Jan-2006 by ObjcDoc 3.0.0