mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2025-01-31 13:11:53 +00:00
net: constify NET_Connect interface
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
11cdcce576
commit
144dcb7ff8
8
NQ/net.h
8
NQ/net.h
@ -164,7 +164,7 @@ extern qsocket_t *net_activeSockets;
|
||||
extern qsocket_t *net_freeSockets;
|
||||
|
||||
typedef struct net_landriver_s {
|
||||
char *name;
|
||||
const char *name;
|
||||
qboolean initialized;
|
||||
int controlSock;
|
||||
int (*Init)(void);
|
||||
@ -186,12 +186,12 @@ extern int net_numlandrivers;
|
||||
extern net_landriver_t net_landrivers[];
|
||||
|
||||
typedef struct net_driver_s {
|
||||
char *name;
|
||||
const char *name;
|
||||
qboolean initialized;
|
||||
int (*Init)(void);
|
||||
void (*Listen)(qboolean state);
|
||||
void (*SearchForHosts)(qboolean xmit);
|
||||
qsocket_t *(*Connect)(char *host);
|
||||
qsocket_t *(*Connect)(const char *host);
|
||||
qsocket_t *(*CheckNewConnections)(void);
|
||||
int (*QGetMessage)(qsocket_t *sock);
|
||||
int (*QSendMessage)(qsocket_t *sock, sizebuf_t *data);
|
||||
@ -268,7 +268,7 @@ struct qsocket_s *NET_CheckNewConnections(void);
|
||||
/*
|
||||
* called by client to connect to a host. Returns -1 if not able to
|
||||
*/
|
||||
struct qsocket_s *NET_Connect(char *host);
|
||||
struct qsocket_s *NET_Connect(const char *host);
|
||||
|
||||
/*
|
||||
* Returns true or false if the given qsocket can currently accept a message
|
||||
|
@ -1180,7 +1180,7 @@ Datagram_SearchForHosts(qboolean xmit)
|
||||
|
||||
|
||||
static qsocket_t *
|
||||
_Datagram_Connect(char *host, net_landriver_t *driver)
|
||||
_Datagram_Connect(const char *host, net_landriver_t *driver)
|
||||
{
|
||||
netadr_t sendaddr;
|
||||
netadr_t readaddr;
|
||||
@ -1318,7 +1318,7 @@ _Datagram_Connect(char *host, net_landriver_t *driver)
|
||||
}
|
||||
|
||||
qsocket_t *
|
||||
Datagram_Connect(char *host)
|
||||
Datagram_Connect(const char *host)
|
||||
{
|
||||
int i;
|
||||
qsocket_t *ret = NULL;
|
||||
|
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
int Datagram_Init(void);
|
||||
void Datagram_Listen(qboolean state);
|
||||
void Datagram_SearchForHosts(qboolean xmit);
|
||||
qsocket_t *Datagram_Connect(char *host);
|
||||
qsocket_t *Datagram_Connect(const char *host);
|
||||
qsocket_t *Datagram_CheckNewConnections(void);
|
||||
int Datagram_GetMessage(qsocket_t *sock);
|
||||
int Datagram_SendMessage(qsocket_t *sock, sizebuf_t *data);
|
||||
|
@ -71,7 +71,7 @@ Loop_SearchForHosts(qboolean xmit)
|
||||
|
||||
|
||||
qsocket_t *
|
||||
Loop_Connect(char *host)
|
||||
Loop_Connect(const char *host)
|
||||
{
|
||||
if (strcmp(host, "local") != 0)
|
||||
return NULL;
|
||||
|
@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
int Loop_Init(void);
|
||||
void Loop_Listen(qboolean state);
|
||||
void Loop_SearchForHosts(qboolean xmit);
|
||||
qsocket_t *Loop_Connect(char *host);
|
||||
qsocket_t *Loop_Connect(const char *host);
|
||||
qsocket_t *Loop_CheckNewConnections(void);
|
||||
int Loop_GetMessage(qsocket_t *sock);
|
||||
int Loop_SendMessage(qsocket_t *sock, sizebuf_t *data);
|
||||
|
@ -378,7 +378,7 @@ int hostCacheCount = 0;
|
||||
hostcache_t hostcache[HOSTCACHESIZE];
|
||||
|
||||
qsocket_t *
|
||||
NET_Connect(char *host)
|
||||
NET_Connect(const char *host)
|
||||
{
|
||||
qsocket_t *ret;
|
||||
int i, n;
|
||||
|
Loading…
x
Reference in New Issue
Block a user