Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
 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 that can accept connections. 
Parameters
Type
For some protocols it might be desirable to
use a different type than sock_stream (like sock_seqpacket).
Therefore we do not hide this parameter here.

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

Summary
Retrieves n bytes from the stream and copies them into pBuffer.
The method avoids incomplete reads due to packet boundaries.        
Parameters
pBuffer
receives the read data.
n
the number of bytes to read. pBuffer must be large enough
to hold the n bytes!
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.
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 receives BytesToRead data from the connected socket,

Parameters
pBuffer
Points to a buffer that will be filled with the received 
data.
BytesToRead
The number of bytes to read. pBuffer must have at least
this size.
Flag
Modifier for the call. Valid values are:

- TMsg_Normal   
- TMsg_OOB      
- TMsg_Peek     
- TMsg_DontRoute
- TMsg_MaxIOVLen
Return
the number of received bytes.

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 sends BytesToSend data from 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:
- TMsg_Normal   
- TMsg_OOB      
- TMsg_Peek     
- TMsg_DontRoute
- TMsg_MaxIOVLen

Return
the number of transfered bytes.

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.