Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1fab08fb
Kaydet (Commit)
1fab08fb
authored
Agu 27, 2017
tarafından
Chris Sherlock
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
osl: cleanup socket.h
Change-Id: I0f7889db570717e9606425b51a418c499bd3a40a
üst
2b756179
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
29 deletions
+43
-29
socket.h
include/osl/socket.h
+43
-29
No files found.
include/osl/socket.h
Dosyayı görüntüle @
1fab08fb
...
...
@@ -234,7 +234,7 @@ SAL_DLLPUBLIC oslSocketAddr SAL_CALL osl_resolveHostname(
@param[in] Port port number in host byte order.
@retval 0 if address could not be created.
*/
SAL_DLLPUBLIC
oslSocketAddr
SAL_CALL
osl_createInetBroadcastAddr
(
SAL_DLLPUBLIC
oslSocketAddr
SAL_CALL
osl_createInetBroadcastAddr
(
rtl_uString
*
strDottedAddr
,
sal_Int32
Port
);
...
...
@@ -266,7 +266,7 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_getServicePort(
/** Retrieves the address-family from the Addr.
@return the family of the socket-address.
In case of an unknown family you get
<code>osl_Socket_FamilyInvalid</code>
.
In case of an unknown family you get
osl_Socket_FamilyInvalid
.
*/
SAL_DLLPUBLIC
oslAddrFamily
SAL_CALL
osl_getFamilyOfSocketAddr
(
oslSocketAddr
Addr
);
...
...
@@ -274,7 +274,7 @@ SAL_DLLPUBLIC oslAddrFamily SAL_CALL osl_getFamilyOfSocketAddr(
/** Retrieves the internet port-number of Addr.
@return the port-number of the address in host-byte order. If Addr
is not an address of type
<code>osl_Socket_FamilyInet</code>, it returns <code>OSL_INVALID_PORT</code>
is not an address of type
osl_Socket_FamilyInet, it returns OSL_INVALID_PORT
*/
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_getInetPortOfSocketAddr
(
oslSocketAddr
Addr
);
...
...
@@ -299,11 +299,12 @@ SAL_DLLPUBLIC oslSocketResult SAL_CALL osl_getHostnameOfSocketAddr(
/** Gets the address in dotted decimal format.
@param[in] Addr The socket address from which to extract the dotted decimal address.
@param[out] strDottedInetAddr Contains the dotted decimal address
(e.g. 141.99.20.34) represented by the address.
If the address is invalid or not of type <code>osl_Socket_FamilyInet</code>,
it returns 0.
@retval If the address is invalid or not of type osl_Socket_FamilyInet,
it returns 0.
@retval osl_Socket_Ok
@retval osl_Socket_Error
*/
...
...
@@ -402,14 +403,14 @@ typedef struct oslSocketImpl * oslSocket;
/** increases the refcount of the socket handle by one
*/
SAL_DLLPUBLIC
void
SAL_CALL
osl_acquireSocket
(
oslSocket
Socket
);
SAL_DLLPUBLIC
void
SAL_CALL
osl_acquireSocket
(
oslSocket
Socket
);
/** decreases the refcount of the socket handle by one.
If the refcount drops to zero, the underlying socket handle
is destroyed and becomes invalid.
*/
SAL_DLLPUBLIC
void
SAL_CALL
osl_releaseSocket
(
oslSocket
Socket
);
SAL_DLLPUBLIC
void
SAL_CALL
osl_releaseSocket
(
oslSocket
Socket
);
/** Create a socket of the specified Family and Type. The semantic of
the Protocol parameter depends on the given family and type.
...
...
@@ -485,8 +486,8 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_listenOnSocket(
@retval 0 if the accept-call failed, otherwise you get a socket
representing the new connection.
*/
SAL_DLLPUBLIC
oslSocket
SAL_CALL
osl_acceptConnectionOnSocket
(
oslSocket
Socket
,
SAL_DLLPUBLIC
oslSocket
SAL_CALL
osl_acceptConnectionOnSocket
(
oslSocket
Socket
,
oslSocketAddr
*
pAddr
);
/** Tries to receive BytesToRead data from the connected socket,
...
...
@@ -548,11 +549,11 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_receiveFromSocket(
@param[in] BytesToSend The number of bytes to send. pBuffer must have at least
this size.
@param[in] Flag Modifier for the call. Valid values are:
@li osl_Socket_MsgNormal
</code>
@li osl_Socket_MsgOOB
</code>
@li osl_Socket_MsgPeek
</code>
@li osl_Socket_MsgDontRoute
</code>
@li osl_Socket_MsgMaxIOVLen
</code>
@li osl_Socket_MsgNormal
@li osl_Socket_MsgOOB
@li osl_Socket_MsgPeek
@li osl_Socket_MsgDontRoute
@li osl_Socket_MsgMaxIOVLen
@return the number of transferred bytes.
*/
...
...
@@ -608,7 +609,8 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_sendToSocket(
@retval sal_False if it would block or if an error occurred.
*/
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_isReceiveReady
(
oslSocket
Socket
,
const
TimeValue
*
pTimeout
);
oslSocket
Socket
,
const
TimeValue
*
pTimeout
);
/** Checks if send operations will block.
You can specify a timeout-value in seconds/microseconds that denotes
...
...
@@ -623,7 +625,8 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isReceiveReady(
@retval sal_False if it would block or if an error occurred.
*/
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_isSendReady
(
oslSocket
Socket
,
const
TimeValue
*
pTimeout
);
oslSocket
Socket
,
const
TimeValue
*
pTimeout
);
/** Checks if a request for out-of-band data will block.
You can specify a timeout-value in seconds/microseconds that denotes
...
...
@@ -637,7 +640,8 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isSendReady(
@retval sal_False if it would block or if an error occurred.
*/
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_isExceptionPending
(
oslSocket
Socket
,
const
TimeValue
*
pTimeout
);
oslSocket
Socket
,
const
TimeValue
*
pTimeout
);
/** Shuts down communication on a connected socket.
@param[in] Socket the Socket to perfom the operation on.
...
...
@@ -651,7 +655,8 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isExceptionPending(
@retval sal_True if the socket could be closed down.
*/
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_shutdownSocket
(
oslSocket
Socket
,
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_shutdownSocket
(
oslSocket
Socket
,
oslSocketDirection
Direction
);
/** Retrieves attributes associated with the socket.
...
...
@@ -707,7 +712,8 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_shutdownSocket(oslSocket Socket,
@see osl_setSocketOption()
*/
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_getSocketOption
(
oslSocket
Socket
,
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_getSocketOption
(
oslSocket
Socket
,
oslSocketOptionLevel
Level
,
oslSocketOption
Option
,
void
*
pBuffer
,
...
...
@@ -730,7 +736,8 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_getSocketOption( oslSocket Socket,
@retval True if the option could be changed.
*/
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_setSocketOption
(
oslSocket
Socket
,
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_setSocketOption
(
oslSocket
Socket
,
oslSocketOptionLevel
Level
,
oslSocketOption
Option
,
void
*
pBuffer
,
...
...
@@ -744,7 +751,8 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_setSocketOption( oslSocket Socket,
@retval sal_True if mode could be changed.
*/
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_enableNonBlockingMode
(
oslSocket
Socket
,
sal_Bool
On
);
oslSocket
Socket
,
sal_Bool
On
);
/** Query state of non-blocking-mode of the socket.
...
...
@@ -753,8 +761,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_enableNonBlockingMode(
@retval True if non-blocking-mode is enabled.
*/
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_isNonBlockingMode
(
oslSocket
Socket
);
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_isNonBlockingMode
(
oslSocket
Socket
);
/** Queries the socket for its type.
...
...
@@ -767,8 +774,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isNonBlockingMode(
@retval osl_Socket_TypeSeqPacket
@retval osl_invalid_SocketType if an error occurred
*/
SAL_DLLPUBLIC
oslSocketType
SAL_CALL
osl_getSocketType
(
oslSocket
Socket
);
SAL_DLLPUBLIC
oslSocketType
SAL_CALL
osl_getSocketType
(
oslSocket
Socket
);
/** returns a string which describes the last socket error.
...
...
@@ -776,7 +782,8 @@ SAL_DLLPUBLIC oslSocketType SAL_CALL osl_getSocketType(
@param[out] strError The string that receives the error message.
*/
SAL_DLLPUBLIC
void
SAL_CALL
osl_getLastSocketErrorDescription
(
oslSocket
Socket
,
rtl_uString
**
strError
);
oslSocket
Socket
,
rtl_uString
**
strError
);
/** Returns a constant describing the last error for the socket system.
...
...
@@ -845,7 +852,8 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isInSocketSet(oslSocketSet Set, oslSocket So
@return -1 on errors, otherwise the number of sockets with pending events. In case of timeout, the
number might be 0.
*/
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_demultiplexSocketEvents
(
oslSocketSet
IncomingSet
,
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_demultiplexSocketEvents
(
oslSocketSet
IncomingSet
,
oslSocketSet
OutgoingSet
,
oslSocketSet
OutOfBandSet
,
const
TimeValue
*
pTimeout
);
...
...
@@ -868,7 +876,10 @@ SAL_DLLPUBLIC void SAL_CALL osl_closeSocket(oslSocket Socket);
@return the number of read bytes. The number will only be smaller than
n if an exceptional condition (e.g. connection closed) occurs.
*/
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_readSocket
(
oslSocket
Socket
,
void
*
pBuffer
,
sal_Int32
nSize
);
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_readSocket
(
oslSocket
Socket
,
void
*
pBuffer
,
sal_Int32
nSize
);
/** Writes n bytes from pBuffer to the stream. The method avoids
...
...
@@ -881,7 +892,10 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_readSocket( oslSocket Socket, void *pBuffer
@return the number of written bytes. The number will only be smaller than
nSize if an exceptional condition (e.g. connection closed) occurs.
*/
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_writeSocket
(
oslSocket
Socket
,
const
void
*
pBuffer
,
sal_Int32
nSize
);
SAL_DLLPUBLIC
sal_Int32
SAL_CALL
osl_writeSocket
(
oslSocket
Socket
,
const
void
*
pBuffer
,
sal_Int32
nSize
);
/**@} end section oslSocket
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment