Functions | |
srRetVal | sbSockLayerInit (int bInitOSStack) |
Global Layer initialization. | |
srRetVal | sbSockLayerExit (int bExitOSStack) |
Global Layer destructor. | |
sbSockObj * | sbSockInit (void) |
Constructor for STREAM sockets, only. | |
sbSockObj * | sbSockInitEx (int iAF, int iSockType) |
Alternate Constructur. | |
srRetVal | sbSockSetNonblocking (sbSockObj *pThis) |
Set the socket to nonblocking state. | |
srRetVal | sbSockAccept (sbSockObj *pThis, sbSockObj *pNew, struct sockaddr *sa, int *iSizeSA) |
Wrapper for the socket accept() call. | |
srRetVal | sbSockListen (sbSockObj *pThis) |
Wrapper for the socket listen() call. | |
srRetVal | sbSockClosesocket (sbSockObj *pThis) |
Close a socket. | |
int | sbSockSelectMulti (srSock_fd_set *fdsetRD, srSock_fd_set *fdsetWR, int iTimOutSecs, int iTimOutMSecs) |
Wrapper for the socket select call on a fd_set structure. | |
int | sbSockSelect (struct sbSockObject *pThis, int iTimOutSecs, int iTimOutMSecs) |
Wrapper for the socket select call on a single socket. | |
int | sbSockReceive (struct sbSockObject *pThis, char *pszBuf, int iLen) |
int | sbSockSend (struct sbSockObject *pThis, const char *pszBuf, int iLen) |
srRetVal | sbSockConnectoToHost (sbSockObj *pThis, char *pszHost, int iPort) |
Connect a socket to a remote host. | |
srRetVal | sbSockBind (sbSockObj *pThis, char *pszHost, int iPort) |
Bind a socket to the provided address. | |
srRetVal | sbSock_gethostname (char **psz) |
Wrapper for gethostname(). |
This is the socket layer for Win32.
2003-08-05 Modified to be a plain lower layer. Moved some of the code to sockets::c.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Adiscon GmbH or Rainer Gerhards nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Wrapper for gethostname().
|
|
Bind a socket to the provided address.
|
|
Connect a socket to a remote host.
|
|
Constructor for STREAM sockets, only.
|
|
Alternate Constructur. Socket TYPE (STREAM/DGRAM) can be specified |
|
Global Layer destructor. Call this only once at the end of the application. All sockets must be destroyed before calling this method.
|
|
Global Layer initialization. Should be called only once per application. This will do all housekeeping necessary to use the layer. DO NOT CALL ANY OTHER METHODS BEFORE THIS ONE HAS BEEN CALLED! They will probably fail!
|
|
Wrapper for the socket select call on a single socket.
|
|
Wrapper for the socket select call on a fd_set structure.
|