VCF::Win32SocketPeer Class Reference
#include <Win32SocketPeer.h>
Inheritance diagram for VCF::Win32SocketPeer:

Public Member Functions | |
| Win32SocketPeer () | |
| Win32SocketPeer (SOCKET handle) | |
| virtual void | setPeerOwner (Socket *socket) |
| virtual int | create () |
| virtual int | close () |
| Closes the OS specific socket handle and releases any resources associated with it. | |
| virtual int | connect (const String &host, const unsigned short port) |
| virtual int | listen (unsigned short port) |
| virtual SocketPeer * | accept () |
| Accepts a new connection and returns a new socket peer instance. | |
| virtual int | recv (unsigned char *bytes, size_t bytesLength) |
| virtual int | send (const unsigned char *bytes, size_t bytesLength) |
| virtual int | recvFrom (unsigned char *bytes, size_t bytesLength, IPEndPoint &fromAddr) |
| virtual int | sendTo (const unsigned char *bytes, size_t bytesLength, const IPEndPoint &toAddr) |
| virtual OSHandleID | getHandleID () |
| Returns a handle for the OS specific socket resource. | |
| virtual IPAddress | getLocalHostIPAddress () |
| Returns the IP address of the local host as a string formatted (for IPV4 at least) as 4 "octets", each separated by the "." character. | |
| virtual unsigned short | getLocalPort () |
| Returns the local port number for this socket instance. | |
| virtual IPAddress | getRemoteHostIPAddress () |
| Returns the IP address of the remote host as a string formatted (for IPV4 at least) as 4 "octets", each separated by the "." character. | |
| virtual unsigned short | getRemotePort () |
| Returns the remote port number for this socket instance. | |
| virtual void | setOptions (Dictionary &options) |
| Sets the options for a socket. | |
| virtual Dictionary | getOptions () |
| Returns a dictionary containing the options for the socket. | |
| virtual bool | wouldOperationBlock () |
| Indicates whether the current operation would block. | |
| virtual void | select (uint32 timeout, SocketArray *readSockets, SocketArray *writeSockets, SocketArray *errorSockets) |
| performs a select, using the various read, write, and/or error socket lists. | |
Protected Attributes | |
| SOCKET | handle_ |
| sockaddr_in | sockAddr_ |
| Socket * | socket_ |
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
|
Accepts a new connection and returns a new socket peer instance. Assumes the listen() call has already occurred. If it has not then an exception is thrown. Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
|
Closes the OS specific socket handle and releases any resources associated with it.
Implements VCF::SocketPeer. |
|
||||||||||||
|
Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
|
Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
|
Returns a handle for the OS specific socket resource. This is typically a socket handle or descriptor, depending on the OS and the underlying implementation. Implements VCF::SocketPeer. |
|
|
Returns the IP address of the local host as a string formatted (for IPV4 at least) as 4 "octets", each separated by the "." character. Each octet is a number string in the range from 0 to 255. Implements VCF::SocketPeer. |
|
|
Returns the local port number for this socket instance.
Implements VCF::SocketPeer. |
|
|
Returns a dictionary containing the options for the socket.
Implements VCF::SocketPeer. |
|
|
Returns the IP address of the remote host as a string formatted (for IPV4 at least) as 4 "octets", each separated by the "." character. Each octet is a number string in the range from 0 to 255. Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
|
Returns the remote port number for this socket instance.
Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
|
Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
||||||||||||
|
Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
||||||||||||||||
|
Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
||||||||||||||||||||
|
performs a select, using the various read, write, and/or error socket lists. Will block for a maximum of timeout milliseconds. If the all the read, write, and error socket arrays are NULL, then the select is performed only on the socket instance itself.
Implements VCF::SocketPeer. |
|
||||||||||||
|
Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
||||||||||||||||
|
Implements VCF::SocketPeer. Reimplemented in VCF::Win32UDPSocketPeer. |
|
|
Sets the options for a socket. The options are stored as a dictionary of items, with the keys being 1 or more values represented by the Socket::soXXX const string variables. Implements VCF::SocketPeer. |
|
|
Implements VCF::SocketPeer. |
|
|
Indicates whether the current operation would block. Assumes a non blocking socket. This is roughly equivalent to getting a an EWOULDBLOCK or WSAEWOULDBLOCK error number.
Implements VCF::SocketPeer. |
Member Data Documentation
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/NetworkKit/Win32SocketPeer.h
