Methods of Class StreamSocket
-
StreamSocket
- StreamSocket(
-
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
(like osl_Socket_TypeSeqPacket ).
Therefore this parameter is not hidden.
|
-
StreamSocket
- StreamSocket(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
-
StreamSocket
- StreamSocket(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
-
StreamSocket
- StreamSocket(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
-
read
- sal_Int32 read(
-
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(
-
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(
-
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_MsgNormal
osl_Socket_MsgOOB
osl_Socket_MsgPeek
osl_Socket_MsgDontRoute
osl_Socket_MsgMaxIOVLen
|
- Return
- the number of received bytes, which may be less than BytesToRead.
-
send
- sal_Int32 send(
-
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_MsgNormal
osl_Socket_MsgOOB
osl_Socket_MsgPeek
osl_Socket_MsgDontRoute
osl_Socket_MsgMaxIOVLen
|
- Return
- the number of transfered bytes. It may be less than BytesToSend.
Top of Page
Copyright © 2003 Sun Microsystems, Inc.