我正在尝试将 ssl 结构传递给线程,但无法使用以下代码实现相同的目的,
if(SSL_set_fd(ssl, client_s)<0)
printf("\n error in assigning socket to SSL:");
else
printf("\n The socket has been assigned to SSL Structure");
pthread_create ( /* Create a child thread */
&threads, /* Thread ID (system assigned) */
&attr, /* Default thread attributes */
my_thread, /* Thread routine */
&ssl);
}
void *my_thread(void * arg)
{
SSL *ssl1;
ssl1 = *(SSL)arg;
int i=1,err,fh,ret;//i
unsigned int buf_len;
我得到的错误如下:
错误:请求转换为非标量类型