Skip to content

I got some errors #1

@CloudFeng

Description

@CloudFeng

using this project some errors in my environment

environment

  • vs 2013
  • 64bit

errors

  1. add a line code in stocketpair.h
#pragma comment(lib, "Ws2_32.lib")
  1. in main.c
thread_t thread;
socket_t sockets[2];

error: this declaration has no storage class or type specifier
after changed:

HANDLE thread;
SOCKET sockets[2];
  1. in read_bytes function
total += recv(sockets[1], &buf[total], (int)(numbytes - total), 0);

argument of type "char (*)[81920]" is incompatible with parameter of type "char *"
buf is a point to point, why use &buf[total].
After changed:

total += recv(sockets[1], buf[total], (int)(numbytes - total), 0);

build and result

When build this project, then call init[] in q thread,sometime it said:wsfull;
sometime it crached. I don't know why, now I try to solve it.Could have some one face this problem? Thanks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions