_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
#include "network/netsockets.h"Go to the source code of this file.
Classes | |
| class | CNetworkParameter |
network.h - The network header file. | |
| CUDPSocket | NetworkFildes |
| Network is in sync. More... | |
| bool | NetworkInSync |
| Network file descriptor. More... | |
| bool | IsNetworkGame () |
| Network is in sync. More... | |
| void | InitNetwork1 () |
| void | ExitNetwork1 () |
| Initialise network. More... | |
| void | NetworkOnStartGame () |
| Cleanup network (port) More... | |
| void | NetworkEvent () |
| Initialise network data for ingame communication. More... | |
| void | NetworkSync () |
| Handle network events. More... | |
| void | NetworkQuitGame () |
| Hold in sync. More... | |
| void | NetworkRecover () |
| Quit game: warn other users. More... | |
| void | NetworkCommands () |
| Recover network. More... | |
| void | NetworkSendChatMessage (const std::string &msg) |
| Get all network commands. More... | |
| void | NetworkSendCommand (int command, const CUnit &unit, int x, int y, const CUnit *dest, const CUnitType *type, int status) |
| Send network command. More... | |
| void | NetworkSendExtendedCommand (int command, int arg1, int arg2, int arg3, int arg4, int status) |
| Send extended network command. More... | |
| void | NetworkSendSelection (CUnit **units, int count) |
| Send Selections to Team. More... | |
| void | NetworkCclRegister () |
| void ExitNetwork1 | ( | ) |
Initialise network.
Cleanup network.
| void InitNetwork1 | ( | ) |
Initialize network port.
|
inline |
Network is in sync.
| void NetworkCclRegister | ( | ) |
| void NetworkCommands | ( | ) |
Recover network.
Handle network commands.
| void NetworkEvent | ( | ) |
Initialise network data for ingame communication.
Called if message for the network is ready. (by WaitEventsOneFrame)
| void NetworkOnStartGame | ( | ) |
Cleanup network (port)
Game will start now. (This function runs on all clients.)
| void NetworkQuitGame | ( | ) |
Hold in sync.
Quit the game.
| void NetworkRecover | ( | ) |
Quit game: warn other users.
Recover network.
| void NetworkSendChatMessage | ( | const std::string & | msg | ) |
Get all network commands.
Send chat message. (Message is sent with low priority)
| msg | Text message to send. |
| void NetworkSendCommand | ( | int | command, |
| const CUnit & | unit, | ||
| int | x, | ||
| int | y, | ||
| const CUnit * | dest, | ||
| const CUnitType * | type, | ||
| int | status | ||
| ) |
Send network command.
Send chat message
Prepare send of command message.
Convert arguments into network format and place it into output queue.
| command | Command (Move,Attack,...). |
| unit | Unit that receive the command. |
| x | optional X map position. |
| y | optional y map position. |
| dest | optional destination unit. |
| type | optional unit-type argument. |
| status | Append command or flush old commands. |
| void NetworkSendExtendedCommand | ( | int | command, |
| int | arg1, | ||
| int | arg2, | ||
| int | arg3, | ||
| int | arg4, | ||
| int | status | ||
| ) |
Send extended network command.
Prepare send of extended command message.
Convert arguments into network format and place it into output queue.
| command | Command (Move,Attack,...). |
| arg1 | optional argument #1 |
| arg2 | optional argument #2 |
| arg3 | optional argument #3 |
| arg4 | optional argument #4 |
| status | Append command or flush old commands. |
Send Selections to Team.
Sends my selections to teammates
| units | Units to send |
| count | Number of units to send |
| void NetworkSync | ( | ) |
Handle network events.
| CUDPSocket NetworkFildes |
Network is in sync.
| bool NetworkInSync |
Network file descriptor.
1.8.17
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.