Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members

FXEX::FXSocket Class Reference

This is the base class of the socket server and socket client classes. More...

#include <FXSocket.h>

Inheritance diagram for FXEX::FXSocket::

FXEX::FXIOHandle FXEX::FXBaseObject FXObject FXEX::FXSocketClient FXEX::FXSocketServer List of all members.

Detailed Description

This is the base class of the socket server and socket client classes.

It can be instantiated on its own if the user wants to have more control over the connection process.

It is intend to be used in these scenarios: a) Application creates an FXSocket object and calls connect(...) to connect to the remote host. All socket reads are forwarded to the application using a SEL_COMMAND with data of FXSocketData* b) Applicaiton creates an FXSocket object and calls listen(...) to listen for any incoming connections. The application must handle the SEL_OPENED message, with data FXSocket*, and manage a list of incoming connections. c) App creats an FXSocketClient which connect to a socket server.

Important: if you are using this class on Win32, then the FXInputHandle is in reality a struct win32socket_t* - this is the only way I could think of to implement it reasonably cleanly... As such you shouldn't directly manipulate the FXInputHandle... In most cases, you wont need to care about this...

For an example, see the socketserver/socketclient demos in the tests directory

Definition at line 52 of file FXSocket.h.