
#ifndef SH_NET
#define SH_NET

#include "shtypes.h"

#define SH_NET_DEFAULT_PORT        7051

#define SH_NET_CMD_PREFIX          "SD:"
#define SH_NET_CMD_START           "start"
#define SH_NET_CMD_KILL            "kill"
#define SH_NET_CMD_DETACH          "detach"
#define SH_NET_CMD_PING            "ping"

#define SH_NET_ERR_OK              "ok"
#define SH_NET_ERR_PONG            "pong"
#define SH_NET_ERR_ACTIVE          "active"
#define SH_NET_ERR_NACTIVE         "nactive"
#define SH_NET_ERR_CONNECT         "connect"
#define SH_NET_ERR_CLIENT_START    "client_start"
#define SH_NET_ERR_CLIENT_COM      "client_com"
#define SH_NET_ERR_HOST            "host"
#define SH_NET_ERR_DIED            "died"
#define SH_NET_ERR_SHUTDOWN        "shutdown"
#define SH_NET_ERR_SYNTAX          "confused"
#define SH_NET_ERR_GENERIC         "generic"


int  shnet_init(void);
int  shnet_connect(sh_client_t *);
int  shnet_close(sh_client_t *);
void shnet_idle(void);
int  shnet_parse(sh_client_t *, char *);
int  shnet_send_cmd(sh_client_t *, char *);

#endif
