Differences between version 2 and revision by previous author of NetworkProgrammingOld.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Sunday, March 2, 2003 3:01:50 am | by ColinMcKinnon | Revert |
Older page: | version 1 | Last edited on Saturday, July 27, 2002 3:10:05 pm | by PerryLorier | Revert |
@@ -27,8 +27,13 @@
if (server<0) {
perror("socket");
!exit(2);
}
+
+((((in above protocol is a pouinter to a struct therefore the call to socket should read as
+ server=socket(PF_INET,SOCK_STREAM,protocol->p_proto);
+CM
+))))
;2: Then we create an address to bind it to. We don't care which of our local IP's we bind it to so we choose "INADDR_ANY" (all interfaces)
struct sockaddr_in address;
address.sin_family = AF_INET;