Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

GSocket Class Reference

#include <INet.h>

Inheritance diagram for GSocket:

GStream GDom GSocketImpl List of all members.

Public Member Functions

virtual OsSocket Handle (OsSocket Set=INVALID_SOCKET)=0
 Returns the actual socket (as defined by the OS).
virtual bool WhatsMyIp (char *IpAddr)=0
 Returns the IP at this end of the socket.
virtual int WhatsMyPort ()=0
 Return the port at this end of the connection.
virtual bool GetRemoteIp (char *IpAddr)=0
 Gets the remote IP.
virtual bool IsReadable ()=0
 True if there is data available to read.
virtual bool Cancel ()=0
 True if the current action has been cancelled.
virtual void Cancel (bool i)=0
 Cancel the current action (might not be implemented).
virtual int Is (GSocketProp p)=0
 Returns some state information.
virtual void Is (GSocketProp p, int i)=0
 Sets some state in the socket, i.e. GAsync.
virtual void SetLogFile (char *FileName=0, int Type=NET_LOG_HEX_DUMP)=0
 Output the data to a file.
virtual bool Listen (int Port=0)=0
 Listens on a given port for an incomming connection.
virtual bool Accept (GSocket *c)=0
 Accepts an incomming connection and connects the socket you pass in to the remote host.
virtual int Error ()=0
 Process an error.
virtual void OnDisconnect ()=0
 Called when the connection is dropped.
virtual void OnRead (char *Data, int Len)=0
 Called when data is read.
virtual void OnWrite (char *Data, int Len)=0
 Called when data is written.
virtual void OnError (int ErrorCode, char *ErrorDescription)=0
 Called when an error occurs.
virtual void OnInformation (char *Str)=0
 Called when some events happens.
virtual int SetParameter (int Param, int Value)=0
 Call to change a parameter (e.g. GSocket_Log).

Detailed Description

Virtual base class for a socket. See the documentation for GSocketImpl for a more through treatment of this object's API.


Member Function Documentation

virtual int GSocket::Is GSocketProp  p  )  [pure virtual]
 

Returns some state information.

Parameters:
p  The type of state to return.

Implemented in GSocketImpl.

virtual bool GSocket::WhatsMyIp char *  IpAddr  )  [pure virtual]
 

Returns the IP at this end of the socket.

Parameters:
IpAddr  Ptr to a buffer of at least 16 bytes

Implemented in GSocketImpl.


The documentation for this class was generated from the following file:
Generated on Wed Oct 26 14:47:02 2005 for Lgi by  doxygen 1.4.1