-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0f9df64
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 () */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 () */ | ||
|