Skip to content

Commit

Permalink
Added the starting files.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsteele committed Apr 4, 2011
0 parents commit 0f9df64
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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 changes: 37 additions & 0 deletions client.c
Original file line number Diff line number Diff line change
@@ -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 changes: 18 additions & 0 deletions server.c
Original file line number Diff line number Diff line change
@@ -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 () */

0 comments on commit 0f9df64

Please sign in to comment.