mirror of https://github.com/yandex/odyssey.git
machinarium: update tests/echo
This commit is contained in:
parent
949eea0566
commit
30fb662f8b
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
|
||||
#include <machinarium.h>
|
||||
#include <uv.h>
|
||||
|
||||
static void
|
||||
test_client(void *arg)
|
||||
|
@ -51,8 +52,10 @@ test_server(void *arg)
|
|||
mm_t env = arg;
|
||||
mm_io_t server = mm_io_new(env);
|
||||
|
||||
struct sockaddr_in sa;
|
||||
uv_ip4_addr("127.0.0.1", 7778, &sa);
|
||||
int rc;
|
||||
rc = mm_bind(server, "127.0.0.1", 7778);
|
||||
rc = mm_bind(server, (struct sockaddr*)&sa);
|
||||
if (rc < 0) {
|
||||
printf("bind failed\n");
|
||||
mm_close(server);
|
||||
|
|
Loading…
Reference in New Issue