| Overview | Namespace | Class | Index | Help |
Methods of Class StreamSocket
- StreamSocket
- StreamSocket(
oslAddrFamily Family = osl_Socket_FamilyInet, oslProtocol Protocol = osl_Socket_ProtocolIp, oslSocketType Type = osl_Socket_TypeStream );
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO YES NO
- Summary
- Creates a socket.
- Parameters
Type For some protocols it might be desirable to use a different type than
osl_Socket_TypeStream(likeosl_Socket_TypeSeqPacket). Therefore this parameter is not hidden.
- StreamSocket
- StreamSocket(
const StreamSocket & );
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO YES NO
- StreamSocket
- StreamSocket(
oslSocket Socket, __sal_NoAcquire noacquire );
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO YES NO
- StreamSocket
- StreamSocket(
oslSocket Socket );
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO YES NO
- read
- sal_Int32 read(
void * pBuffer, sal_uInt32 n );
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO YES NO
- Description
- Retrieves n bytes from the stream and copies them into pBuffer. The method avoids incomplete reads due to packet boundaries and is thus blocking.
- Parameters
pBuffer receives the read data. pBuffer must be large enough to hold n bytes.
n the number of bytes to read.
- Return
- the number of read bytes. The number will only be smaller than n if an exceptional condition (e.g. connection closed) occurs.
- write
- sal_Int32 write(
const void * pBuffer, sal_uInt32 n );
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO YES NO
- Summary
- Writes n bytes from pBuffer to the stream. The method avoids incomplete writes due to packet boundaries and is thus blocking.
- Parameters
pBuffer contains the data to be written.
n the number of bytes to write.
- Return
- the number of written bytes. The number will only be smaller than n if an exceptional condition (e.g. connection closed) occurs.
- recv
- sal_Int32 recv(
void * pBuffer, sal_uInt32 BytesToRead, oslSocketMsgFlag flags = osl_Socket_MsgNormal );
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO YES NO
- Summary
- Tries to receive BytesToRead data from the connected socket,
- Parameters
pBuffer Points to a buffer that will be filled with the received data. pBuffer must have at least have a size of BytesToRead.
BytesToRead The number of bytes to read.
Flag Modifier for the call. Valid values are:
osl_Socket_MsgNormalosl_Socket_MsgOOBosl_Socket_MsgPeekosl_Socket_MsgDontRouteosl_Socket_MsgMaxIOVLen
- Return
- the number of received bytes, which may be less than BytesToRead.
- send
- sal_Int32 send(
const void * pBuffer, sal_uInt32 BytesToSend, oslSocketMsgFlag = osl_Socket_MsgNormal );
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO NO
- Summary
- Tries to send BytesToSend data to the connected socket.
- Parameters
pBuffer Points to a buffer that contains the send-data.
BytesToSend The number of bytes to send. pBuffer must have at least this size.
Flag Modifier for the call. Valid values are:
osl_Socket_MsgNormalosl_Socket_MsgOOBosl_Socket_MsgPeekosl_Socket_MsgDontRouteosl_Socket_MsgMaxIOVLen
- Return
- the number of transfered bytes. It may be less than BytesToSend.
Top of Page
Copyright © 2009 Sun Microsystems, Inc.


