Lines Matching refs:pSocket
1140 oslSocket pSocket = __osl_createSocketImpl(0); in osl_createSocket() local
1142 if (pSocket == NULL) in osl_createSocket()
1146 pSocket->m_Socket= socket(FAMILY_TO_NATIVE(Family), in osl_createSocket()
1151 if(pSocket->m_Socket == OSL_INVALID_SOCKET) in osl_createSocket()
1153 __osl_destroySocketImpl(pSocket); in osl_createSocket()
1154 pSocket= 0; in osl_createSocket()
1158 pSocket->m_Flags = 0; in osl_createSocket()
1159 pSocket->m_CloseCallback = NULL; in osl_createSocket()
1160 pSocket->m_CallbackArg = NULL; in osl_createSocket()
1163 return pSocket; in osl_createSocket()
1166 void SAL_CALL osl_acquireSocket( oslSocket pSocket ) in osl_acquireSocket() argument
1168 osl_incrementInterlockedCount( &(pSocket->m_nRefCount) ); in osl_acquireSocket()
1171 void SAL_CALL osl_releaseSocket( oslSocket pSocket ) in osl_releaseSocket() argument
1173 if( pSocket && 0 == osl_decrementInterlockedCount( &(pSocket->m_nRefCount) ) ) in osl_releaseSocket()
1175 osl_closeSocket( pSocket ); in osl_releaseSocket()
1176 __osl_destroySocketImpl( pSocket ); in osl_releaseSocket()
1183 void SAL_CALL osl_closeSocket(oslSocket pSocket) in osl_closeSocket() argument
1186 if(pSocket==0) in osl_closeSocket()
1190 closesocket(pSocket->m_Socket); in osl_closeSocket()
1192 pSocket->m_Socket = OSL_INVALID_SOCKET; in osl_closeSocket()
1195 if (pSocket->m_CloseCallback != NULL) in osl_closeSocket()
1197 pSocket->m_CloseCallback(pSocket->m_CallbackArg); in osl_closeSocket()
1207 oslSocketAddr SAL_CALL osl_getLocalAddrOfSocket(oslSocket pSocket) in osl_getLocalAddrOfSocket() argument
1212 if (pSocket == NULL) /* ENOTSOCK */ in osl_getLocalAddrOfSocket()
1217 if (getsockname(pSocket->m_Socket, &Addr, &AddrLen) == OSL_SOCKET_ERROR) in osl_getLocalAddrOfSocket()
1227 oslSocketAddr SAL_CALL osl_getPeerAddrOfSocket(oslSocket pSocket) in osl_getPeerAddrOfSocket() argument
1232 if (pSocket == NULL) /* ENOTSOCK */ in osl_getPeerAddrOfSocket()
1237 if (getpeername(pSocket->m_Socket, &Addr, &AddrLen) == OSL_SOCKET_ERROR) in osl_getPeerAddrOfSocket()
1247 sal_Bool SAL_CALL osl_bindAddrToSocket ( oslSocket pSocket, oslSocketAddr pAddr) in osl_bindAddrToSocket() argument
1251 if (pSocket == NULL) /* ENOTSOCK */ in osl_bindAddrToSocket()
1254 return (bind(pSocket->m_Socket, in osl_bindAddrToSocket()
1263 oslSocket pSocket, in osl_connectSocketTo() argument
1268 if (pSocket == NULL) /* ENOTSOCK */ in osl_connectSocketTo()
1279 if(connect(pSocket->m_Socket, in osl_connectSocketTo()
1294 if (pSocket->m_Flags & OSL_SOCKET_FLAGS_NONBLOCKING) in osl_connectSocketTo()
1296 if (connect(pSocket->m_Socket, in osl_connectSocketTo()
1317 pSocket->m_Socket, FIONBIO, &Param) != OSL_SOCKET_ERROR); in osl_connectSocketTo()
1320 if (connect(pSocket->m_Socket, in osl_connectSocketTo()
1327 ioctlsocket(pSocket->m_Socket, FIONBIO, &Param); in osl_connectSocketTo()
1339 ioctlsocket(pSocket->m_Socket, FIONBIO, &Param); in osl_connectSocketTo()
1347 FD_SET(pSocket->m_Socket, &fds); in osl_connectSocketTo()
1354 error= select(pSocket->m_Socket+1, in osl_connectSocketTo()
1363 FD_ISSET(pSocket->m_Socket, &fds), in osl_connectSocketTo()
1388 ioctlsocket(pSocket->m_Socket, FIONBIO, &Param); in osl_connectSocketTo()
1398 oslSocket pSocket, in osl_listenOnSocket() argument
1401 if (pSocket == NULL) /* ENOTSOCK */ in osl_listenOnSocket()
1404 return (listen(pSocket->m_Socket, in osl_listenOnSocket()
1414 oslSocket pSocket, in osl_acceptConnectionOnSocket() argument
1417 if (pSocket == NULL) /* ENOTSOCK */ in osl_acceptConnectionOnSocket()
1433 Connection= accept(pSocket->m_Socket, &Addr, &AddrLen); in osl_acceptConnectionOnSocket()
1444 Connection= accept(pSocket->m_Socket, 0, 0); in osl_acceptConnectionOnSocket()
1466 oslSocket pSocket, in osl_receiveSocket() argument
1471 if (pSocket == NULL) /* ENOTSOCK */ in osl_receiveSocket()
1474 return recv(pSocket->m_Socket, in osl_receiveSocket()
1484 oslSocket pSocket, in osl_receiveFromSocket() argument
1498 if (pSocket == NULL) /* ENOTSOCK */ in osl_receiveFromSocket()
1501 return recvfrom(pSocket->m_Socket, in osl_receiveFromSocket()
1513 oslSocket pSocket, in osl_sendSocket() argument
1518 if (pSocket == NULL) /* ENOTSOCK */ in osl_sendSocket()
1521 return send(pSocket->m_Socket, in osl_sendSocket()
1531 oslSocket pSocket, in osl_sendToSocket() argument
1537 if (pSocket == NULL) /* ENOTSOCK */ in osl_sendToSocket()
1547 return sendto(pSocket->m_Socket, in osl_sendToSocket()
1558 sal_Int32 SAL_CALL osl_readSocket( oslSocket pSocket, void *pBuffer, sal_Int32 n ) in osl_readSocket() argument
1562 OSL_ASSERT( pSocket); in osl_readSocket()
1570 RetVal= osl_receiveSocket(pSocket, in osl_readSocket()
1592 sal_Int32 SAL_CALL osl_writeSocket( oslSocket pSocket, const void *pBuffer, sal_Int32 n ) in osl_writeSocket() argument
1594 OSL_ASSERT( pSocket ); in osl_writeSocket()
1604 RetVal= osl_sendSocket( pSocket,Ptr,BytesToSend,osl_Socket_MsgNormal); in osl_writeSocket()
1625 oslSocket pSocket, in osl_isReceiveReady() argument
1631 if (pSocket == NULL) /* ENOTSOCK */ in osl_isReceiveReady()
1635 FD_SET(pSocket->m_Socket, &fds); in osl_isReceiveReady()
1643 return (select(pSocket->m_Socket + 1, /* no of sockets to monitor */ in osl_isReceiveReady()
1654 oslSocket pSocket, in osl_isSendReady() argument
1660 if (pSocket == NULL) /* ENOTSOCK */ in osl_isSendReady()
1664 FD_SET(pSocket->m_Socket, &fds); in osl_isSendReady()
1672 return (select(pSocket->m_Socket + 1, /* no of sockets to monitor */ in osl_isSendReady()
1683 oslSocket pSocket, in osl_isExceptionPending() argument
1689 if (pSocket == NULL) /* ENOTSOCK */ in osl_isExceptionPending()
1693 FD_SET(pSocket->m_Socket, &fds); in osl_isExceptionPending()
1701 return (select(pSocket->m_Socket + 1, /* no of sockets to monitor */ in osl_isExceptionPending()
1712 oslSocket pSocket, in osl_shutdownSocket() argument
1715 if (pSocket == NULL) /* ENOTSOCK */ in osl_shutdownSocket()
1718 return (shutdown(pSocket->m_Socket, DIRECTION_TO_NATIVE(Direction))==0); in osl_shutdownSocket()
1725 oslSocket pSocket, in osl_getSocketOption() argument
1731 if (pSocket == NULL) /* ENOTSOCK */ in osl_getSocketOption()
1734 if (getsockopt(pSocket->m_Socket, in osl_getSocketOption()
1750 oslSocket pSocket, in osl_setSocketOption() argument
1756 if (pSocket == NULL) /* ENOTSOCK */ in osl_setSocketOption()
1759 return(setsockopt(pSocket->m_Socket, in osl_setSocketOption()
1769 sal_Bool SAL_CALL osl_enableNonBlockingMode ( oslSocket pSocket, sal_Bool On) in osl_enableNonBlockingMode() argument
1773 if (pSocket == NULL) /* ENOTSOCK */ in osl_enableNonBlockingMode()
1776 pSocket->m_Flags = Param ? in osl_enableNonBlockingMode()
1777 (pSocket->m_Flags | OSL_SOCKET_FLAGS_NONBLOCKING) : in osl_enableNonBlockingMode()
1778 (pSocket->m_Flags & ~OSL_SOCKET_FLAGS_NONBLOCKING) ; in osl_enableNonBlockingMode()
1781 ioctlsocket(pSocket->m_Socket, FIONBIO, &Param) != OSL_SOCKET_ERROR); in osl_enableNonBlockingMode()
1787 sal_Bool SAL_CALL osl_isNonBlockingMode(oslSocket pSocket) in osl_isNonBlockingMode() argument
1789 if (pSocket == NULL) /* ENOTSOCK */ in osl_isNonBlockingMode()
1792 return (sal_Bool)((pSocket->m_Flags & OSL_SOCKET_FLAGS_NONBLOCKING) != 0); in osl_isNonBlockingMode()
1798 oslSocketType SAL_CALL osl_getSocketType(oslSocket pSocket) in osl_getSocketType() argument
1803 if (pSocket == NULL) /* ENOTSOCK */ in osl_getSocketType()
1806 if(getsockopt(pSocket->m_Socket, in osl_getSocketType()