Commit 0cbc2bae authored by Heiko Liermann's avatar Heiko Liermann
Browse files

- bugfix

parent 561540f5
......@@ -17,7 +17,7 @@ int main(int argc, char **argv) {
memset(&server_addr, 0, sizeof(server_addr)); //socket address structure
server_addr.sin_family = AF_INET; // inte
server_addr.sin_addr.s_addr = htonl(INADDR_ANY); //specify the IP address allows the server to accept a client //connection on any interface,
server_addr.sin_port = htons(strtol(argv[2], NULL, 10));
server_addr.sin_port = htons(strtol(argv[1], NULL, 10));
bind_wrapper(server_fd, (const struct sockaddr *) &server_addr, (socklen_t) sizeof(server_addr)); //(1)The bind() function shall assign a local socket address address to a socket identified by descriptor socket
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment