_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Public Member Functions | List of all members
SocketSet Class Reference

#include <net_lowlevel.h>

Public Member Functions

 SocketSet ()
 
lowlevel.cpp - The network lowlevel.
void AddSocket (Socket socket)
 
void DelSocket (Socket socket)
 
int Select (int timeout)
 Wait for socket set ready. More...
 
int HasDataToRead (Socket socket) const
 Check if a socket in a socket set is ready. More...
 

Constructor & Destructor Documentation

◆ SocketSet()

SocketSet::SocketSet ( )
inline

Member Function Documentation

◆ AddSocket()

void SocketSet::AddSocket ( Socket  socket)

Add a socket to a socket set

Parameters
socketSocket to add to the socket set

◆ DelSocket()

void SocketSet::DelSocket ( Socket  socket)

Delete a socket from a socket set

Parameters
socketSocket to delete from the socket set

◆ HasDataToRead()

int SocketSet::HasDataToRead ( Socket  socket) const

Check if a socket in a socket set is ready.

Check if a socket in a socket set is ready.

Parameters
socketSocket to check
Returns
Non-zero if socket is ready

◆ Select()

int SocketSet::Select ( int  timeout)

Wait for socket set ready.

Wait for socket set ready.

Parameters
timeoutTimeout in 1/1000 seconds.
Returns
1 if data is available, 0 if not, -1 if failure.

The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.