Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added the starting files.

  • Loading branch information...
commit 0f9df6438b5098e9879b051b0a50d94cab1123f0 0 parents
@johnsteele authored
Showing with 67 additions and 0 deletions.
  1. +12 −0 Makefile
  2. +37 −0 client.c
  3. +18 −0 server.c
12 Makefile
@@ -0,0 +1,12 @@
+# File: Makefile
+# Author: John Steele
+# Date: March 3, 2011
+# Description: Compiles and creates an executable for the server application.
+
+BIN=server
+CC=gcc
+CFLAGS=-g -o
+SRCS=$(BIN).c
+
+
+
37 client.c
@@ -0,0 +1,37 @@
+/**
+ * @file sockets_server_client/client.c
+ * @author John Steele <EMAIL:programjsteele {at} gmail {dot} com>
+ * @version 1.0.0
+ * @date
+ * Created: Sun 03 Apr 2011 04:55:08 PM PDT \n
+ * Last Update: Sun 03 Apr 2011 04:55:08 PM PDT
+ */
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#define SERVER_PORT 40448
+#define MAX_LINE 256
+
+int main (int argc, char **argv)
+{
+ FILE *fp;
+ struct hostent *hp;
+ struct sockaddr_in sin;
+ char *host;
+ char buf [MAX_LINE];
+ int s;
+ int len;
+
+ if (argc == 2) host = argv [1];
+ else fprintf (stderr, "Usage: sockets_com host\n");
+
+
+
+
+
+ return 1;
+} /* end main () */
18 server.c
@@ -0,0 +1,18 @@
+/**
+ * @file sockets_server_client/server.c
+ * @author John Steele <EMAIL:programjsteele {at} gmail {dot} com>
+ * @version 1.0.0
+ * @date
+ * Created: Sun 03 Apr 2011 04:56:50 PM PDT \n
+ * Last Update: Sun 03 Apr 2011 04:56:50 PM PDT
+ */
+
+#include <stdio.h>
+
+
+int main (int argc, char **argv)
+{
+
+
+} /* end main () */
+
Please sign in to comment.
Something went wrong with that request. Please try again.