º¯Êý¹¦ÄÜÊǸ¸×Ó½ø³ÌʹÓÃTCP socket½øÐÐͨÐÅ£¬Ö»ÐèÒª°Ñ×Ö·û´®ÏÔʾ³öÀ´£¬ÔËÐÐÌáʾ´íÎóÊÇ
at line 176 connect ERROR: con_rtn = -1, errno = 22 Invalid argument
²»ÖªºÎ¹Ê£¿
/*
*function : TCP communication with a forked subtask
struct sockaddr_un
{
sa_family_t sun_family; // PF_NUIX or AF_UNIX or AF_LOCAL
char sun_path[UNIX_PATH_MAX]; //name of path;
};
//usr/include/linux/socket.h
typedef unsigned short sa_family_t;
struct sockaddr //this is general structure;
{
unsigned short sa_family; //AF_xxx
char sa_data[14]; // 14 bytes of protocol address
};
//usr/include/netinet/in.h
struct sockaddr_in //internet socket, can convert between above and it;
{
short int sin_family; //address cluster
unsigned short int sin_port; //port number
struct in_addr; //ip address
unsigned char sin_zero[8]; //for the same size as struct sockaddr
};
struct in_addr
{
СµÜ×î½üÐèÒªÒ»¸öÓÃsocket»ñÈ¡htmlÎĵµµÄ´úÂ룬µ«ÊÇÀÏÊDz»ÄÜ»ñÈ¡ÍêÕûµÄhtmlÔ´Âë¡£ÔÒò²»Ã÷£¬Íû¸ßÊÖÖ¸µã£¡
C/C++ code:
char *Http_GET(char *host,int port,char *data) //·¢ËÍGETÇëÇó
{
char response[2 ......
ÎÒÖ®Ç°ÖÆ×÷µÄlinux×Ô¶¯°²×°isoÒѾ³É¹¦ÁË£¬ÏÖÔÚÏë¶ÔÆä½øÐÐһЩ¶¨ÖÆÐ޸쬱ÈÈ磬¸ü¸ÄgrubͼƬµÈ¡£
ÎÒÔÚks.cfgµÄ%post¶ÎÀïÃæÊÇÕâÑùдµÄ£º
%post --nochroot
# Move the contents of the tar into their new locati ......