#include <bgsocket.h>
Class diagram for BGSocket:
Public Members | |||
![]() | ![]() | virtual BGString | toString ( ) |
![]() | ![]() | Generates string representation of this object. More... | |
![]() | ![]() | virtual unsigned long | hash ( ) |
![]() | ![]() | Generates a 'unique' hashvalue of this object. More... | |
![]() | ![]() | virtual bool | equals ( BGObject &obj ) |
![]() | ![]() | Returns true, if specified object is equal to own instance. More... | |
![]() | ![]() | virtual BGString | className ( ) |
![]() | ![]() | Return the class name for this class. More... | |
![]() | ![]() | void | connect ( const char*, long ) |
![]() | ![]() | Connect to specified server name and port. | |
![]() | ![]() | long | send ( unsigned char*, long, long ) |
![]() | ![]() | Send bytearray to socket. | |
![]() | ![]() | long | recv ( unsigned char*, long, long ) |
![]() | ![]() | Receice bytearray from socket. | |
![]() | ![]() | void | close ( ) |
![]() | ![]() | Close socket. |
Note: Thats just a first prototype which will be enhanced / changed to correct class tree / behaviour.
+ Should we add stream support ?
virtual BGString BGSocket::toString () [virtual]
|
Generates string representation of this object.
This is useful for logging, etc. - This method will replace dump !
Reimplemented from BGObject.
virtual unsigned long BGSocket::hash () [virtual]
|
Generates a 'unique' hashvalue of this object.
Note: The returned pointer will point to class buffer. Therefore do not delete it, dupe it if you need it outside of instance lifecycle.
Reimplemented from BGObject.
virtual bool BGSocket::equals (BGObject & obj) [virtual]
|
Returns true, if specified object is equal to own instance.
First we compare class identifier. If both object has same class type, we dispatch to compare method, which should always be able to compare instances with same type.
obj | Object reference to compare with us |
Reimplemented from BGObject.
virtual BGString BGSocket::className () [virtual]
|
Return the class name for this class.
Subclasses should overwrite this method to return their own name.
Reimplemented from BGObject.