Macros | Functions
network_old.cc File Reference
#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"
Include dependency graph for network_old.cc:

Go to the source code of this file.

Macros

#define DB_FLG   "[net work] "
 
#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   "[net work] "

Definition at line 39 of file network_old.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_old.cc:40

Definition at line 42 of file network_old.cc.

#define PRINT_ERR   printf

Definition at line 40 of file network_old.cc.

Function Documentation

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

Definition at line 226 of file network_old.cc.

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

Definition at line 182 of file network_old.cc.

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

Definition at line 237 of file network_old.cc.



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