Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

Socket Class Reference

#include <socket.h>

Inheritance diagram for Socket:

Inheritance graph
[legend]
Collaboration diagram for Socket:

Collaboration graph
[legend]
List of all members.

Detailed Description

Abstract interface for network sockets.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Types

enum  SOCKETEVENT {
  NONE = 0x0000000, CONNECTION = 0x0000001, DATAIN = 0x0000002, ERR = 0x0000004,
  HUP = 0x0000008, NVAL = 0x0000010, TIMEOUT = 0x0000020, CONNECTED = 0x0000040
}
 Socket event identifiers (bitfield). More...


Public Member Functions

 Socket (SocketCallback *pkCallback=0)
virtual ~Socket ()
virtual int GetFD ()=0
virtual void SetBlocking (bool bBlock=false)=0
virtual unsigned int Poll (int iTimeout)=0

Public Attributes

SocketCallbackm_pkCallback


Member Enumeration Documentation

enum SOCKETEVENT
 

Socket event identifiers (bitfield).

Enumeration values:
NONE  No event
CONNECTION  Connection received
DATAIN  Data to be read
ERR  Error
HUP  Hung up
NVAL  Invalid socket
TIMEOUT  Timeout
CONNECTED  Connected


Constructor & Destructor Documentation

Socket SocketCallback pkCallback = 0  )  [inline]
 

Parameters:
pkCallback Socket callback object receiving events

virtual ~Socket  )  [inline, virtual]
 


Member Function Documentation

virtual int GetFD  )  [pure virtual]
 

Returns:
Socket FD

Implemented in TCPSocket, and UDPSocket.

virtual void SetBlocking bool  bBlock = false  )  [pure virtual]
 

Set blocking/nonblocking mode

Parameters:
bBlock Blocking flag

Implemented in TCPSocket, and UDPSocket.

virtual unsigned int Poll int  iTimeout  )  [pure virtual]
 

Poll socket

Parameters:
iTimeout Timeout in milliseconds
Returns:
Events bitfield

Implemented in TCPSocket, and UDPSocket.


Member Data Documentation

SocketCallback* m_pkCallback
 

Callback object receiving events


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:15 2004 for NeoEngine by doxygen 1.3.5