project_files/frontlib/socket.h
changeset 7234 613998625a3c
parent 7224 5143861c83bd
child 7271 5608ac657362
equal deleted inserted replaced
7230:240620f46dd7 7234:613998625a3c
    47  * Returns NULL if nothing can be accepted.
    47  * Returns NULL if nothing can be accepted.
    48  */
    48  */
    49 flib_tcpsocket *flib_socket_accept(flib_acceptor *acceptor, bool localOnly);
    49 flib_tcpsocket *flib_socket_accept(flib_acceptor *acceptor, bool localOnly);
    50 
    50 
    51 /**
    51 /**
       
    52  * Try to connect to the server at the given address.
       
    53  */
       
    54 flib_tcpsocket *flib_socket_connect(const char *host, uint16_t port);
       
    55 
       
    56 /**
    52  * Close the socket and free its memory.
    57  * Close the socket and free its memory.
    53  * If the socket is already NULL, nothing happens.
    58  * If the socket is already NULL, nothing happens.
    54  */
    59  */
    55 void flib_socket_close(flib_tcpsocket *socket);
    60 void flib_socket_close(flib_tcpsocket *socket);
    56 
    61