#include <stdio.h>
#include <string.h>
#include <iostream>
#include <errno.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netinet/tcp.h>
#include <sys/ioctl.h>
#include "xarm/core/os/network.h"
Go to the source code of this file.
#define DB_FLG "[net work] " |
#define PERRNO |
( |
|
ret, |
|
|
|
db_flg, |
|
|
|
str |
|
) |
| |
Value:{ \
PRINT_ERR(
"%s%s, errno=%d\n", db_flg, str, errno); \
return -1; \
} \
\
}
Definition at line 51 of file network.cc.
int socket_connect_server |
( |
int * |
socket, |
|
|
char |
server_ip[], |
|
|
int |
server_port |
|
) |
| |
int socket_init |
( |
char * |
local_ip, |
|
|
int |
port, |
|
|
int |
is_server |
|
) |
| |
int socket_send_data |
( |
int |
client_fp, |
|
|
unsigned char * |
data, |
|
|
int |
len |
|
) |
| |