| Overview | Namespace | Class | Index | Help |
| oslSocketType | Type, |
| oslAddrFamily | Family = osl_Socket_FamilyInet, |
| oslProtocol | Protocol = osl_Socket_ProtocolIp ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Creates a socket.
| Family | |
| Type | |
| Protocol |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
| const Socket & | socket ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
| oslSocket | socketHandle ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
| oslSocket | socketHandle, |
| __sal_NoAcquire | noacquire ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Destructor. Releases the underlying handle
| oslSocket | socketHandle ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Assignment operator. If socket was already created, the old one will be discarded.
| const Socket & | sock ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Assignment operator. If socket was already created, the old one will be discarded.
| const Socket & | rSocket ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
true, when the underlying handle of both Socket references are identical. false otherwise
| const oslSocket | socketHandle ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
true, when the underlying handle of this socket reference and the parameter is identical. false otherwise
| oslSocketDirection | Direction = osl_Socket_DirReadWrite ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Closes a definite direction of the bidirectional stream
| Direction |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Closes a socket. Note that closing a socket is identical to shutdown( osl_Socket_DirReadWrite ), as the operating system distinguish both cases, both functions or offered in this API.
| SocketAddr & | Addr ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
Retrieves the address of the local interface of this socket.
Addr [out] receives the address.
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Get the local port of the socket.
the port number or OSL_INVALID_PORT on errors.
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Get the hostname for the local interface.
the hostname or an empty string ("").
| SocketAddr & | Addr ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
Retrieves the address of the remote host of this socket.
| Addr | receives the address. |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Get the remote port of the socket.
the port number or OSL_INVALID_PORT on errors.
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Get the hostname for the remote interface.
the hostname or an empty string ("").
| const SocketAddr & | LocalInterface ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Binds the socket to the specified (local) interface.
| LocalInterface | Address of the Interface |
True if bind was successful.
| const TimeValue * | pTimeout = 0 ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
Checks if read operations will block. You can specify a timeout-value in seconds/nanoseconds that denotes how sal_Int32 the operation will block if the Socket is not ready.
True if read operations (recv, recvFrom, accept) on the Socket will NOT block; False if it would block or if an error occured.
| pTimeout | if 0, the operation will block without a timeout. Otherwise the specified amout of time. |
| const TimeValue * | pTimeout = 0 ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
Checks if send operations will block. You can specify a timeout-value in seconds/nanoseconds that denotes how sal_Int32 the operation will block if the Socket is not ready.
True if send operations (send, sendTo) on the Socket will NOT block; False if it would block or if an error occured.
| pTimeout | if 0, the operation will block without a timeout. Otherwise the specified amout of time. |
| const TimeValue * | pTimeout = 0 ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
Checks if a request for out-of-band data will block. You can specify a timeout-value in seconds/nanoseconds that denotes how sal_Int32 the operation will block if the Socket has no pending OOB data.
True if OOB-request operations (recv with appropriate flags) on the Socket will NOT block; False if it would block or if an error occured.
| pTimeout | if 0, the operation will block without a timeout. Otherwise the specified amout of time. |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Queries the socket for its type.
one of:
| oslSocketOption | Option, |
| void * | pBuffer, |
| sal_uInt32 | BufferLen, |
| oslSocketOptionLevel | Level = osl_Socket_LevelSocket ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
Retrieves option-attributes associated with the socket.
| Option | |
| pBuffer | The Buffer will be filled with the attribute. |
| BufferSize | The size of pBuffer. |
| Level | The option level. Valid values are: - osl_Socket_LevelSocket : Socket Level - osl_Socket_LevelTcp : Level of Transmission Control Protocol |
The size of the attribute copied into pBuffer ot -1 if an error occured.
| oslSocketOption | Option, |
| void * | pBuffer, |
| sal_uInt32 | BufferLen, |
| oslSocketOptionLevel | Level = osl_Socket_LevelSocket ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
Sets the sockets attributes.
| Option | denotes the option to modify. Valid values (depending on the Level) are: - osl_Socket_Option_Debug - osl_Socket_OptionAcceptConn - osl_Socket_OptionReuseAddr - osl_Socket_OptionKeepAlive - osl_Socket_OptionDontRoute - osl_Socket_OptionBroadcast - osl_Socket_OptionUseLoopback - osl_Socket_OptionLinger - osl_Socket_OptionOOBinLine - osl_Socket_OptionSndBuf - osl_Socket_OptionRcvBuf - osl_Socket_OptionSndLowat - osl_Socket_OptionRcvLowat - osl_Socket_OptionSndTimeo - osl_Socket_OptionRcvTimeo - osl_Socket_OptionError - osl_Socket_OptionType - osl_Socket_OptionTcpNoDelay If not above mentioned otherwise, the options are only valid for level osl_Socket_LevelSocket. |
| pBuffer | Pointer to a Buffer which contains the attribute-value. |
| BufferSize | contains the length of the Buffer. |
| Level | selects the level for which an option should be changed. Valid values are: - osl_Socket_evel_Socket : Socket Level - osl_Socket_Level_Tcp : Level of Transmission Control Protocol |
True if the option could be changed.
| oslSocketOption | option, |
| sal_Int32 | nValue ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Convenience function for setting sal_Bool and sal_Int32 option values.
| oslSocketOption | option ) const; |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | YES | NO | NO | NO | YES | NO |
Convenience function for retrieving sal_Bool and sal_Int32 option values.
| sal_Bool | bNonBlockingMode ); |
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Enables/disables non-blocking mode of the socket.
| bNonBlockingMode | |
True if mode could be set.
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Query blocking mode of the socket.
True if non-blocking mode is set.
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Gets clears the error status @returns the current error state.
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Delivers a constant decribing the last error for the socket system.
ENONE if no error occured, invalid_SocketError if an unknown (unmapped) error occured, otherwise an enum describing the error.
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Builds a string with the last error-message for the socket.
| virtual | abstract | const | volatile | template | static | inline | C-linkage |
| NO | NO | NO | NO | NO | NO | YES | NO |
Returns the underlying handle unacquired (The caller must acquire it to keep it)
Copyright 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.