#include <INet.h>
Inheritance diagram for GSocket:

Public Member Functions | |
| GSocket () | |
| Creates the class. | |
| ~GSocket () | |
| Destroys the class. | |
| OsSocket | Handle (OsSocket Set=INVALID_SOCKET) |
| Returns the operating system handle to the socket. | |
| bool | IsOK () |
| Returns true if the internal state of the class is ok. | |
| void | SetLogFile (char *FileName=0, int Type=NET_LOG_HEX_DUMP) |
| Sets logging on the socket. | |
| bool | WhatsMyIp (char *IpAddr) |
| Returns the IP address at this end of the socket. | |
| int | WhatsMyPort () |
| Returns the port at this end of the socket. | |
| bool | GetRemoteIp (char *IpAddr) |
| Gets the IP address at the remote end of the socket. | |
| bool | IsReadable () |
| Returns whether there is data available for reading. | |
| int | Is (GSocketProp p) |
| Allows you to query the socket for various things. | |
| void | Is (GSocketProp p, int i) |
| Sets an option on the socket. | |
| bool | Cancel () |
| Returns true if the operation was cancelled. | |
| void | Cancel (bool i) |
| Cancel the current operation. | |
| int | Open (char *HostAddr, int Port) |
| Opens a connection. | |
| bool | IsOpen () |
| Returns true if the socket is connected. | |
| int | Close () |
| Closes the connection to the remote host. | |
| bool | Listen (int Port=0) |
| Listens on a given port for an incomming connection. | |
| bool | Accept (GSocketI *c) |
| Accepts an incomming connection and connects the socket you pass in to the remote host. | |
| int | Write (void *Data, int Len, int Flags) |
| Sends data to the remote host. | |
| int | Read (void *Data, int Len, int Flags) |
| Reads data from the remote host. | |
| int | Error () |
| Returns the last error or 0. | |
| int64 | GetSize () |
| Not supported. | |
| int64 | SetSize (int64 Size) |
| Not supported. | |
| int64 | GetPos () |
| Not supported. | |
| int64 | SetPos (int64 Pos) |
| Not supported. | |
| void | OnDisconnect () |
| Gets called when the connection is disconnected. | |
| void | OnRead (char *Data, int Len) |
| Gets called when data is received. | |
| void | OnWrite (char *Data, int Len) |
| Gets called when data is sent. | |
| void | OnError (int ErrorCode, char *ErrorDescription) |
| Gets called when an error occurs. | |
| void | OnInformation (char *Str) |
| Gets called when some information is available. | |
| int | SetParameter (int Param, int Value) |
| Parameter change handler. | |
Friends | |
| class | GNetwork |
|
|
Accepts an incomming connection and connects the socket you pass in to the remote host.
Implements GSocketI. |
|
||||||||||||
|
Opens a connection.
Reimplemented from GStream. |
|
||||||||||||||||
|
Reads data from the remote host.
Reimplemented from GStream. |
|
||||||||||||
|
Sets logging on the socket.
Implements GSocketI. |
|
||||||||||||
|
Parameter change handler.
Implements GSocketI. |
|
||||||||||||||||
|
Sends data to the remote host.
Reimplemented from GStream. |
1.4.1