NAME
====
vg_nw_connect() - only clients: connect to the network-server
SYNOPSIS
========
int vg_nw_connect(int proto, const char * host, const char * serv, const char * scast)
DESCRIPTION
===========
All players (but not the master) must connect to the network-server
using vg_nw_connect().
The master player connects to it automatically after he has started
the server with vg_nw_startserver().
proto is the protocol, it must be the protocoll the server uses:
PROTO_UDP or PROTO_TCP
host is the hostname or the ip of the network-server.
If it is NULL the server is searched via broadcast/multicast.
serv is the portnumber or service-string the network-server uses.
scast is the portnumber or service-string of the
broadcast- or multicast-server to get the ip of the network-server.
If host is set, scast should be NULL.
After a successful connect, all players have to wait for the connects
of all other players, calling vg_nw_waitforconnects().
RETURN VALUE
============
If it succeeds, it returns 0.
If an error occurs, it returns -1, giving out an error message to stderr.
SEE ALSO
========
Index
Understanding network
vg_nw_setplayer()
vg_nw_startserver()
vg_nw_waitforconnects()
vg_nw_setvar()
vg_nw_getvar()
vg_nw_setcommon()
vg_nw_getcommon()
vg_nw_dumppacket()
vg_nw_sendinit()
vg_nw_recvinit()
vg_nw_myplayer()
vg_nw_maxplayer()
vg_nw_virtualplayer()
vg_nw_isalive()
vg_nw_recvkeys()
vg_nw_keypressed()
vg_nw_mousepressed()
vg_nw_mousex()
vg_nw_mousey()
vg_nw_senddata()
vg_nw_sendcommon()
vg_nw_setdead()
vg_nw_dumpsprite()
vg_nw_undumpsprite()
vg_nw_close()