Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <Socket.h>
Inheritance diagram for Socket:
For more information on using wireless, please read the following tutorials:
Definition at line 47 of file Socket.h.
Public Member Functions | |
Socket (int sockn) | |
constructor | |
virtual | ~Socket () |
destructor | |
byte * | getWriteBuffer (int bytesreq) |
void | write (int size) |
writes the specified number of bytes starting at the pointer returned. | |
int | read () |
Blocking read. | |
byte * | getReadBuffer () |
getReadBuffer is used with blocking read's | |
void | init () |
initialize socket member variables. This is different from the constructor since sockets are reused | |
int | setFlushType (FlushType_t fType) |
Chooses between blocking and non-blocking input, output. | |
void | setTextForward () |
causes this socket to forward output to stdout if it is not connected, call setForward(NULL) to unset | |
void | setForward (Socket *forsock) |
causes this socket to forward output to sock if it is not connected, pass NULL to unset | |
void | setVerbosity (int verbose) |
Picks a level of verbosity for filtering pprintf commands. | |
int | write (const byte *buf, int size) |
int | read (byte *buf, int size) |
Blocking read. | |
int | printf (const char *fmt,...) |
int | vprintf (const char *fmt, va_list al) |
int | pprintf (int vlevel, const char *fmt,...) |
Similar to printf, except it takes an extra first argument. | |
void | flush () |
Public Attributes | |
int | sock |
unique non-negative integer representing socket. Serves as index into socket Objects array | |
Protected Member Functions | |
Socket (const Socket &) | |
copy constructor, don't call | |
Socket & | operator= (const Socket &) |
assignment operator, don't call | |
Protected Attributes | |
TransportType_t | trType |
private ALOKL_TODO | |
FlushType_t | flType |
private ALOKL_TODO | |
int | verbosity |
private ALOKL_TODO | |
antModuleRef | endpoint |
private ALOKL_TODO | |
ConnectionState | state |
private ALOKL_TODO | |
int | sendBufSize |
private ALOKL_TODO | |
int | recvBufSize |
private ALOKL_TODO | |
int | sendSize |
private ALOKL_TODO | |
int | recvSize |
private ALOKL_TODO | |
int | writeSize |
private ALOKL_TODO | |
int | readSize |
private ALOKL_TODO | |
bool | tx |
private ALOKL_TODO | |
bool | rx |
private ALOKL_TODO | |
antSharedBuffer | sendBuffer |
private ALOKL_TODO | |
antSharedBuffer | recvBuffer |
private ALOKL_TODO | |
byte * | sendData |
private ALOKL_TODO | |
byte * | recvData |
private ALOKL_TODO | |
byte * | readData |
private ALOKL_TODO | |
byte * | writeData |
private ALOKL_TODO | |
int | server_port |
private ALOKL_TODO | |
int(* | rcvcbckfn )(char *, int) |
private ALOKL_TODO | |
bool | textForward |
private ALOKL_TODO | |
char * | textForwardBuf |
private ALOKL_TODO | |
Socket * | forwardSock |
private ALOKL_TODO | |
bool | daemon |
private ALOKL_TODO | |
Friends | |
class | Wireless |
|
constructor
|
|
destructor
|
|
copy constructor, don't call
|
|
All write commands on the socket will implicity call this. You don't need to call it, unless you're implementing your own write Reimplemented in DummySocket. Definition at line 66 of file Socket.cc. Referenced by Wireless::SendCont(), vprintf(), and write(). |
|
getReadBuffer is used with blocking read's The read(void) and getReadBuffer combo eliminates one buffer copy. You don't need to use getReadBuffer with read(byte*, int) Blocking read is currently broken - it will be fixed in the next release
Reimplemented in DummySocket. |
|
The getWriteBuffer-write(int) combo eliminates one buffer copy. You don't need to use getWriteBuffer with write(byte*, int)
Reimplemented in DummySocket. Definition at line 11 of file Socket.cc. Referenced by SegCamBehavior::openPacket(), RawCamBehavior::openPacket(), WorldStateSerializerBehavior::processEvent(), WMMonitorBehavior::report(), DumpFileControl::selectedFile(), and write(). |
|
initialize socket member variables. This is different from the constructor since sockets are reused
Reimplemented in DummySocket. Definition at line 51 of file Socket.cc. Referenced by Wireless::connect(), and Wireless::listen(). |
|
assignment operator, don't call
|
|
Similar to printf, except it takes an extra first argument. If vlevel is than or equal to the current verbosity level, the string will be printed else it will be ignored
Reimplemented in DummySocket. |
|
|
Blocking read. You might want to consider the read(void) and getReadBuffer combo if you call this often Blocking read is currently broken - it will be fixed in the next release
Reimplemented in DummySocket. |
|
Blocking read. Tries to read upto receive buffer size worth of data from this socket. Blocking read is currently broken - it will be fixed in the next release
Reimplemented in DummySocket. |
|
Chooses between blocking and non-blocking input, output. This function can only be called when a socket is disconnected, since it is a bad idea to mix blocking and non-blocking input, output. The default for a socket is non-blocking
Reimplemented in DummySocket. Definition at line 58 of file Socket.cc. Referenced by MMCombo::DoInit(). |
|
causes this socket to forward output to sock if it is not connected, pass NULL to unset
Definition at line 117 of file Socket.h. Referenced by MMCombo::DoInit(). |
|
causes this socket to forward output to stdout if it is not connected, call setForward(NULL) to unset
Reimplemented in DummySocket. Definition at line 114 of file Socket.h. Referenced by MMCombo::DoInit(). |
|
Picks a level of verbosity for filtering pprintf commands. The higher the verbosity, the more the number of messages printed. This is useful for filtering out non-important messages with very little processor cost. Default is 0.
Reimplemented in DummySocket. |
|
It's standard stuff. man 3 printf on most systems should give you more information Reimplemented in DummySocket. Definition at line 116 of file Socket.cc. Referenced by printf(). |
|
You might want to consider the getWriteBuffer-write(int) combo if you call this often
Reimplemented in DummySocket. |
|
writes the specified number of bytes starting at the pointer returned. in a (prior) call to getWriteBufer
Reimplemented in DummySocket. Definition at line 26 of file Socket.cc. Referenced by SegCamBehavior::closePacket(), RawCamBehavior::closePacket(), StringInputControl::doReadStdIn(), Controller::loadGUI(), WorldStateSerializerBehavior::processEvent(), ControlBase::refresh(), BatteryCheckControl::refresh(), WMMonitorBehavior::report(), DumpFileControl::selectedFile(), and write(). |
|
Reimplemented in DummySocket. |
|
private ALOKL_TODO
Definition at line 198 of file Socket.h. Referenced by Wireless::close(), Wireless::CloseCont(), Wireless::setDaemon(), and Socket(). |
|
private ALOKL_TODO
Definition at line 182 of file Socket.h. Referenced by Wireless::connect(), Wireless::listen(), and Socket(). |
|
private ALOKL_TODO
Definition at line 178 of file Socket.h. Referenced by flush(), setFlushType(), and Socket(). |
|
private ALOKL_TODO
Definition at line 196 of file Socket.h. Referenced by flush(), getWriteBuffer(), setForward(), setTextForward(), Socket(), vprintf(), and write(). |
|
private ALOKL_TODO
Referenced by Wireless::ConnectCont(), Wireless::ListenCont(), Wireless::receive(), Wireless::ReceiveCont(), Wireless::setReceiver(), and Socket(). |
|
private ALOKL_TODO
Definition at line 190 of file Socket.h. Referenced by Wireless::socket(), and Socket(). |
|
private ALOKL_TODO
Definition at line 185 of file Socket.h. Referenced by Socket(). |
|
private ALOKL_TODO
Definition at line 188 of file Socket.h. Referenced by Wireless::close(), Wireless::socket(), and Socket(). |
|
private ALOKL_TODO
Definition at line 185 of file Socket.h. Referenced by Wireless::socket(), and Socket(). |
|
private ALOKL_TODO
Definition at line 189 of file Socket.h. Referenced by Wireless::socket(), and Socket(). |
|
private ALOKL_TODO
Definition at line 185 of file Socket.h. Referenced by Wireless::ReceiveCont(), and Socket(). |
|
private ALOKL_TODO
Definition at line 186 of file Socket.h. Referenced by Wireless::hasData(), Wireless::receive(), and Socket(). |
|
private ALOKL_TODO
Definition at line 188 of file Socket.h. Referenced by Wireless::close(), Wireless::socket(), and Socket(). |
|
private ALOKL_TODO
Definition at line 185 of file Socket.h. Referenced by getWriteBuffer(), Wireless::socket(), Socket(), and vprintf(). |
|
private ALOKL_TODO
Definition at line 189 of file Socket.h. Referenced by flush(), Wireless::socket(), and Socket(). |
|
private ALOKL_TODO
Definition at line 185 of file Socket.h. Referenced by Wireless::blockingSend(), flush(), init(), Wireless::send(), and Socket(). |
|
private ALOKL_TODO
Definition at line 191 of file Socket.h. Referenced by Wireless::close(), Wireless::CloseCont(), Wireless::listen(), and Socket(). |
|
unique non-negative integer representing socket. Serves as index into socket Objects array
Definition at line 51 of file Socket.h. Referenced by Wireless::close(), Wireless::connect(), Controller::console_callback(), StringInputControl::doReadStdIn(), ControlBase::doReadStdIn(), WMMonitorBehavior::DoStart(), WalkControllerBehavior::DoStart(), HeadPointControllerBehavior::DoStart(), EStopControllerBehavior::DoStart(), Controller::DoStart(), Aibo3DControllerBehavior::DoStart(), SegCamBehavior::DoStop(), RawCamBehavior::DoStop(), flush(), Wireless::listen(), SegCamBehavior::processEvent(), RawCamBehavior::processEvent(), WalkCalibration::refresh(), ValueEditControl< T >::refresh(), ControlBase::refresh(), BatteryCheckControl::refresh(), Wireless::setDaemon(), Wireless::setReceiver(), and Socket(). |
|
private ALOKL_TODO
Definition at line 183 of file Socket.h. Referenced by Wireless::BindCont(), Wireless::blockingSend(), Wireless::close(), Wireless::CloseCont(), Wireless::connect(), Wireless::ConnectCont(), flush(), getWriteBuffer(), Wireless::isConnected(), Wireless::listen(), Wireless::ListenCont(), Wireless::receive(), Wireless::ReceiveCont(), Wireless::send(), Wireless::SendCont(), setFlushType(), Socket(), vprintf(), and write(). |
|
private ALOKL_TODO
Definition at line 194 of file Socket.h. Referenced by getWriteBuffer(), setForward(), setTextForward(), Socket(), vprintf(), and write(). |
|
private ALOKL_TODO
Definition at line 195 of file Socket.h. Referenced by getWriteBuffer(), Socket(), and write(). |
|
private ALOKL_TODO
Definition at line 177 of file Socket.h. Referenced by Wireless::connect(), Wireless::listen(), Wireless::socket(), and Socket(). |
|
private ALOKL_TODO
Definition at line 186 of file Socket.h. Referenced by Wireless::blockingSend(), flush(), Wireless::isReady(), Wireless::send(), Wireless::SendCont(), and Socket(). |
|
private ALOKL_TODO
Definition at line 180 of file Socket.h. Referenced by pprintf(), setVerbosity(), and Socket(). |
|
private ALOKL_TODO
Definition at line 190 of file Socket.h. Referenced by flush(), getWriteBuffer(), Wireless::socket(), Socket(), and vprintf(). |
|
private ALOKL_TODO
Definition at line 185 of file Socket.h. Referenced by flush(), getWriteBuffer(), init(), Socket(), vprintf(), and write(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:27 2004 by Doxygen 1.3.4 |