小编Adi*_*rma的帖子

error的含义是什么:取消引用指向不完整类型的指针

这是我的计划:

//SSL-Server-Client-Linkage-Broker.c  
#include <errno.h>  
#include <unistd.h>  
#include <malloc.h>  
#include <string.h>
#include <asm/stat.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <arpa/inet.h>  
#include <sys/socket.h>  
#include <sys/types.h>  
#include <netinet/in.h>  
#include <resolv.h>  
#include "openssl/ssl.h"  
#include "openssl/err.h"  

#define FAIL    -1  

int OpenConnection(const char *hostnamen, int portn) //for software house 
{   int sd;  
    struct hostent *host;  
    struct sockaddr_in addr;  

    if ( (host = gethostbyname(hostnamen)) == NULL )  
    {  
        perror(hostnamen);  
        abort();  
    }  
    sd = socket(PF_INET, SOCK_STREAM, 0);  
    bzero(&addr, sizeof(addr));  
    addr.sin_family = AF_INET;  
    addr.sin_port = htons(portn);  
    addr.sin_addr.s_addr = *(long*)(host->h_addr);  
    if …
Run Code Online (Sandbox Code Playgroud)

c sockets ssl client

2
推荐指数
1
解决办法
6730
查看次数

标签 统计

c ×1

client ×1

sockets ×1

ssl ×1