2007-02-17 23:44:45 +00:00
|
|
|
/***************************************************************************
|
|
|
|
|
* Copyright (C) 2007 by Lothar May *
|
|
|
|
|
* *
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
/* Socket message definitions. */
|
|
|
|
|
#ifndef _SOCKET_MSG_H_
|
|
|
|
|
#define _SOCKET_MSG_H_
|
|
|
|
|
|
2007-03-13 02:23:12 +00:00
|
|
|
#define ERR_SOCK_INTERNAL 1
|
|
|
|
|
#define ERR_SOCK_SERVERADDR_NOT_SET 2
|
|
|
|
|
#define ERR_SOCK_INVALID_PORT 3
|
|
|
|
|
#define ERR_SOCK_CREATION_FAILED 4
|
2007-03-13 23:27:17 +00:00
|
|
|
#define ERR_SOCK_SET_ADDR_FAILED 5
|
|
|
|
|
#define ERR_SOCK_SET_PORT_FAILED 6
|
|
|
|
|
#define ERR_SOCK_RESOLVE_FAILED 7
|
|
|
|
|
#define ERR_SOCK_BIND_FAILED 8
|
|
|
|
|
#define ERR_SOCK_LISTEN_FAILED 9
|
|
|
|
|
#define ERR_SOCK_ACCEPT_FAILED 10
|
|
|
|
|
#define ERR_SOCK_CONNECT_FAILED 11
|
|
|
|
|
#define ERR_SOCK_SELECT_FAILED 12
|
|
|
|
|
#define ERR_SOCK_RECV_FAILED 13
|
|
|
|
|
#define ERR_SOCK_SEND_FAILED 14
|
|
|
|
|
#define ERR_SOCK_CONN_RESET 15
|
2007-03-20 02:20:50 +00:00
|
|
|
#define ERR_SOCK_CONN_EXISTS 16
|
2007-04-08 16:18:20 +00:00
|
|
|
#define ERR_SOCK_INVALID_NAME_STR 17
|
|
|
|
|
#define ERR_SOCK_INVALID_PWD_STR 18
|
|
|
|
|
#define ERR_SOCK_INVALID_PACKET 19
|
2007-02-17 23:44:45 +00:00
|
|
|
|
2007-02-18 11:26:57 +00:00
|
|
|
// This is an internal message which is not reported.
|
|
|
|
|
#define MSG_SOCK_INTERNAL_PENDING 0
|
|
|
|
|
|
2007-03-20 02:20:50 +00:00
|
|
|
// The following messages are connect messages.
|
2007-02-17 23:44:45 +00:00
|
|
|
#define MSG_SOCK_INIT_DONE 1
|
|
|
|
|
#define MSG_SOCK_RESOLVE_DONE 2
|
|
|
|
|
#define MSG_SOCK_CONNECT_DONE 3
|
2007-02-25 23:16:26 +00:00
|
|
|
#define MSG_SOCK_SESSION_DONE 4
|
2007-02-17 23:44:45 +00:00
|
|
|
|
2007-03-20 02:20:50 +00:00
|
|
|
#define MSG_SOCK_LIMIT_CONNECT MSG_SOCK_SESSION_DONE
|
|
|
|
|
|
|
|
|
|
// The following messages are game messages.
|
|
|
|
|
#define MSG_SOCK_GAME_START 5
|
|
|
|
|
|
2007-02-25 23:16:26 +00:00
|
|
|
#define MSG_SOCK_LAST MSG_SOCK_SESSION_DONE
|
2007-02-18 19:16:34 +00:00
|
|
|
|
2007-02-17 23:44:45 +00:00
|
|
|
#endif
|
|
|
|
|
|