project_files/frontlib/ipc/gameconn.h
changeset 7275 15f722e0b96f
parent 7271 5608ac657362
child 7314 6171f0bad318
equal deleted inserted replaced
7273:8eed495fd8da 7275:15f722e0b96f
    32  * Perform I/O operations and call callbacks if something interesting happens.
    32  * Perform I/O operations and call callbacks if something interesting happens.
    33  * Should be called regularly.
    33  * Should be called regularly.
    34  */
    34  */
    35 void flib_gameconn_tick(flib_gameconn *conn);
    35 void flib_gameconn_tick(flib_gameconn *conn);
    36 
    36 
    37 int flib_gameconn_send_enginemsg(flib_gameconn *conn, uint8_t *data, int len);
    37 int flib_gameconn_send_enginemsg(flib_gameconn *conn, const uint8_t *data, size_t len);
    38 int flib_gameconn_send_textmsg(flib_gameconn *conn, int msgtype, const char *msg);
    38 int flib_gameconn_send_textmsg(flib_gameconn *conn, int msgtype, const char *msg);
    39 int flib_gameconn_send_chatmsg(flib_gameconn *conn, const char *playername, const char *msg);
    39 int flib_gameconn_send_chatmsg(flib_gameconn *conn, const char *playername, const char *msg);
    40 
    40 
    41 /**
    41 /**
    42  * handleConnect(void *context)
    42  * handleConnect(void *context)
    70  * TODO handleStats(???)
    70  * TODO handleStats(???)
    71  */
    71  */
    72 
    72 
    73 /**
    73 /**
    74  * ...needs to be passed on to the server in a net game
    74  * ...needs to be passed on to the server in a net game
    75  * handleEngineMessage(void *context, const uint8_t *em, int size)
    75  * handleEngineMessage(void *context, const uint8_t *em, size_t size)
    76  */
    76  */
    77 void flib_gameconn_onEngineMessage(flib_gameconn *conn, void (*callback)(void *context, const uint8_t *em, int size), void* context);
    77 void flib_gameconn_onEngineMessage(flib_gameconn *conn, void (*callback)(void *context, const uint8_t *em, size_t size), void* context);
    78 
    78 
    79 // TODO efinish
    79 // TODO efinish
    80 
    80 
    81 #endif
    81 #endif