GSocketI Class Reference

#include <LgiInterfaces.h>

Inheritance diagram for GSocketI:

GSocket

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 GetLocalIp (char *IpAddr)
 Returns the IP at this end of the socket.
virtual int GetLocalPort ()
 Return the port at this end of the connection.
virtual bool GetRemoteIp (char *IpAddr)
 Gets the remote IP.
virtual int GetRemotePort ()
 Return the port at this end of the connection.
virtual int GetTimeout ()
 Gets the current timeout for operations in ms.
virtual void SetTimeout (int ms)
 Sets the current timeout for operations in ms.
virtual bool IsReadable (int TimeoutMs=0)
 True if there is data available to read.
virtual bool IsWritable (int TimeoutMs=0)
 True if the socket can be written to.
virtual bool CanAccept (int TimeoutMs=0)
 True if the socket can be accept.
virtual bool IsBlocking ()
 Returns whether the socket is set to blocking or not.
virtual void IsBlocking (bool block)
 Set whether the socket should block or not.
virtual bool IsDelayed ()
 Get the send delay setting.
virtual void IsDelayed (bool Delay)
 Set the send delay setting.
virtual bool GetUdp ()
 Get UPD mode.
virtual void SetUdp (bool b)
 Set UPD mode.
virtual int ReadUdp (void *Buffer, int Size, int Flags, uint32 *Ip=0, uint16 *Port=0)
 Read UPD packet.
virtual int WriteUdp (void *Buffer, int Size, int Flags, uint32 Ip, uint16 Port)
 Write UPD packet.
virtual bool Listen (int Port=0)
 Listens on a given port for an incomming connection.
virtual bool Accept (GSocketI *c)
 Accepts an incomming connection and connects the socket you pass in to the remote host.
virtual void OnDisconnect ()
 Called when the connection is dropped.
virtual void OnRead (char *Data, int Len)
 Called when data is read.
virtual void OnWrite (char *Data, int Len)
 Called when data is written.
virtual void OnError (int ErrorCode, char *ErrorDescription)
 Called when an error occurs.
virtual void OnInformation (char *Str)
 Called when some events happens.
virtual int Error (void *Param)
 Process an error.


Detailed Description

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

Member Function Documentation

virtual bool GSocketI::GetLocalIp ( char *  IpAddr  )  [inline, virtual]

Returns the IP at this end of the socket.

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

Reimplemented in GSocket.


The documentation for this class was generated from the following file:

Generated on Wed Dec 1 15:41:04 2010 for Lgi by  doxygen 1.5.7.1