Macros | Functions
network_new.cc File Reference
#include <arpa/inet.h>
#include <net/if.h>
#include <netinet/tcp.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include "xarm/core/os/network.h"
Include dependency graph for network_new.cc:

Go to the source code of this file.

Macros

#define DB_FLG   "[NetWork] "
 
#define PERRNO(ret, db_flg, str)
 
#define PRINT_ERR   printf
 

Functions

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)
 

Macro Definition Documentation

#define DB_FLG   "[NetWork] "

Definition at line 24 of file network_new.cc.

#define PERRNO (   ret,
  db_flg,
  str 
)
Value:
{ \
if (-1 == ret) { \
PRINT_ERR("%s%s, errno=%d\n", db_flg, str, errno); \
return -1; \
} \
\
}
#define PRINT_ERR
Definition: network_new.cc:25

Definition at line 27 of file network_new.cc.

#define PRINT_ERR   printf

Definition at line 25 of file network_new.cc.

Function Documentation

int socket_connect_server ( int *  socket,
char  server_ip[],
int  server_port 
)

Definition at line 80 of file network_new.cc.

int socket_init ( char *  local_ip,
int  port,
int  is_server 
)

Definition at line 36 of file network_new.cc.

int socket_send_data ( int  client_fp,
unsigned char *  data,
int  len 
)

Definition at line 91 of file network_new.cc.



xarm_api
Author(s):
autogenerated on Sat May 8 2021 02:51:23