|
OpenTop 1.3 | |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||
SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD |
#include "ot/net/SocketImpl.h"
Method Summary | |
protected virtual void |
accept(SocketImpl* pSocket)=0 Waits for and accepts a new socket connection on a passive (server) socket. |
protected virtual size_t |
available() const=0 Returns the number of bytes that may be read from the socket without blocking. |
protected virtual void |
bind(InetAddress* pAddress, int port)=0 Binds this socket to the specified port and IP address. |
protected virtual void |
close()=0 Closes the underlying operating system socket. |
protected virtual void |
connect(InetAddress* pAddress, int port)=0 Brief. |
protected virtual void |
connect(const String& host, int port)=0 Opens a socket connection with the named host. |
protected virtual void |
connect(InetAddress* pAddress, int port, size_t timeoutMS)=0 Opens a socket connection with the specified IP address. |
protected virtual void |
create(bool bStream)=0 Creates a socket handle that will be managed and contained by this SocketImpl. |
protected virtual bool |
getAutoClose() const=0 |
protected virtual RefPtr< InetAddress > |
getInetAddress() const=0 Returns the IP address to which this socket is bound or connected. |
protected virtual RefPtr< InputStream > |
getInputStream() const=0 Returns an InputStream that can be used to read bytes from the client socket. |
protected virtual int |
getIntOption(int level, int option) const=0 Fetches the (integer) value of a socket option. |
protected virtual RefPtr< InetAddress > |
getLocalAddress() const=0 Returns the IP address to which the socket is bound. |
protected virtual int |
getLocalPort() const=0 Returns the port number to which the socket is bound. |
protected virtual RefPtr< OutputStream > |
getOutputStream() const=0 Returns an output stream for writing bytes to a client socket. |
protected virtual int |
getPort() const=0 Returns the remote port to which a client socket is connected. |
protected virtual RefPtr< InetAddress > |
getRemoteAddress() const=0 Returns the IP address to which the client socket is connected. |
protected virtual RefPtr< SocketDescriptor > |
getSocketDescriptor() const=0 Returns a SocketDescriptor for the contained operating system socket. |
protected virtual size_t |
getTimeout() const=0 Fetches the value of the pseudo socket option: SO_TIMEOUT. |
protected virtual void |
getVoidOption(int level, int option, void* pOut, size_t* pLen) const=0 Fetches the data value of a socket option. |
protected virtual bool |
isBound() const=0 Tests if a server Socket has yet been bound to a local IP address and port. |
protected virtual bool |
isClosed() const=0 Tests if the socket is closed. |
protected virtual bool |
isConnected() const=0 Tests the connected status of this Socket. |
protected virtual void |
listen(size_t backlog)=0 Puts the server socket into listening mode and sets the maximum queue size for pending connection requests. |
protected virtual void |
setAutoClose(bool bEnable)=0 |
protected virtual void |
setInetAddress(InetAddress* pAddress)=0 Sets the remote IP address for a newly accepted client socket. |
protected virtual void |
setIntOption(int level, int option, int value)=0 Sets a (integer) socket option. |
protected virtual void |
setLocalPort(int localPort)=0 Sets the local port for a newly accepted client socket. |
protected virtual void |
setPort(int port)=0 Sets the remote port for a newly accepted client socket. |
protected virtual void |
setSocketDescriptor(SocketDescriptor* pSocketDescriptor)=0 Sets the socket descriptor for a newly accepted client socket. |
protected virtual void |
setTimeout(size_t timeoutMS)=0 Sets the value of the pseudo socket option: SO_TIMEOUT. |
protected virtual void |
setVoidOption(int level, int option, void* pValue, size_t valLen)=0 Sets a void socket option. |
protected virtual void |
shutdownInput()=0 Shuts down this Socket for input operations. |
protected virtual void |
shutdownOutput()=0 Shuts down this Socket for output operations. |
protected virtual String |
toString() const=0 Returns a string representation of the socket. |
Methods inherited from class ot::ManagedObject |
addRef, getRefCount, onFinalRelease, operator=, release |
Method Detail |
protected virtual void accept(SocketImpl* pSocket)=0
pSocket
- SocketTimeoutException
- SocketException
- protected virtual size_t available() const=0
protected virtual void bind(InetAddress* pAddress, int port)=0
pAddress
- port
- SocketException
- protected virtual void close()=0
protected virtual void connect(InetAddress* pAddress, int port)=0
protected virtual void connect(const String& host, int port)=0
host
- port
- UnknownHostException
- SocketException
- protected virtual void connect(InetAddress* pAddress, int port, size_t timeoutMS)=0
host
- port
- timeoutMS
- SocketException
- SocketTimeoutException
- protected virtual void create(bool bStream)=0
bStream
- protected virtual bool getAutoClose() const=0
protected virtual RefPtr< InetAddress > getInetAddress() const=0
protected virtual RefPtr< InputStream > getInputStream() const=0
SocketException
- protected virtual int getIntOption(int level, int option) const=0
level
- option
- SocketException
- protected virtual RefPtr< InetAddress > getLocalAddress() const=0
protected virtual int getLocalPort() const=0
protected virtual RefPtr< OutputStream > getOutputStream() const=0
SocketException
- protected virtual int getPort() const=0
protected virtual RefPtr< InetAddress > getRemoteAddress() const=0
protected virtual RefPtr< SocketDescriptor > getSocketDescriptor() const=0
protected virtual size_t getTimeout() const=0
protected virtual void getVoidOption(int level, int option, void* pOut, size_t* pLen) const=0
level
- option
- pOut
- pLen
- SocketException
- protected virtual bool isBound() const=0
protected virtual bool isClosed() const=0
protected virtual bool isConnected() const=0
protected virtual void listen(size_t backlog)=0
backlog
- SocketException
- protected virtual void setAutoClose(bool bEnable)=0
protected virtual void setInetAddress(InetAddress* pAddress)=0
protected virtual void setIntOption(int level, int option, int value)=0
level
- option
- value
- SocketException
- protected virtual void setLocalPort(int localPort)=0
protected virtual void setPort(int port)=0
protected virtual void setSocketDescriptor(SocketDescriptor* pSocketDescriptor)=0
protected virtual void setTimeout(size_t timeoutMS)=0
timeoutMS
- protected virtual void setVoidOption(int level, int option, void* pValue, size_t valLen)=0
level
- option
- pValue
- valLen
- SocketException
- protected virtual void shutdownInput()=0
SocketException
- protected virtual void shutdownOutput()=0
SocketException
- protected virtual String toString() const=0
|
OpenTop 1.3 | |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||
SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD |