Skip to content
Discussion options

You must be logged in to vote

The problem was EchoAssignment::clientMain.

int serverfd;
  if (serverfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) < 0) {
    return -1;
  }

should be

int serverfd;
  if ((serverfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
    return -1;
  }

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Tosaaa
Comment options

@Pusnow
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Tosaaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants