WIP: Comply with GNU Coding Standards
This commit is contained in:
parent
59c594c5c3
commit
0e9076d239
15
server1.c
15
server1.c
@ -1,8 +1,7 @@
|
|||||||
/*
|
// server1 - server program for demonstrating data transfer over TCP/IP
|
||||||
* ENGR2782 - CN Assignment
|
|
||||||
* Your challenge is to format the following code in a readable manner, anwsering the questions in the comments.
|
// This program complies with the GNU Coding Standards found here:
|
||||||
*
|
// https://www.gnu.org/prep/standards/html_node/index.html
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -16,11 +15,15 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
#define BUFFERT 512
|
#define BUFFERT 512
|
||||||
#define BACKLOG 1
|
#define BACKLOG 1
|
||||||
|
|
||||||
int create_server_socket (int port);
|
int create_server_socket (int port);
|
||||||
struct sockaddr_in sock_serv,sock_clt;
|
struct sockaddr_in sock_serv,sock_clt;
|
||||||
int main(int argc, char** argv){
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
int sfd, fd;
|
int sfd, fd;
|
||||||
unsigned int length = sizeof(struct sockaddr_in);
|
unsigned int length = sizeof(struct sockaddr_in);
|
||||||
long int n, m, count = 0;
|
long int n, m, count = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user