Skip to content

Commit

Permalink
cleaning from conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
papanikge committed Nov 2, 2012
1 parent 5a2682b commit 69b7e53
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 62 deletions.
47 changes: 22 additions & 25 deletions client.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,32 @@
* There is absolutely no warranty
*/


#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>

int main(int argc, char **argv) {
/*TODO: arange filestream for order
/* argument managing
/*TODO: declare sent variable
*/
/* create clients socket descriptor */
int client_sd;
/* struct for server socket address */
struct sockaddr_un serv_addr;
/* create clients endpoint */
if (client_sd = socket( PF_UNIX, SOCK_STREAM, 0 )== -1 )
fatal("while creating clients socket");
/* socket internal information --- Maybe: AF_LOCAL */
servaddr.sun_family = AF_UNIX;
/* Zero all fields of servaddr. */
bzero( &servaddr, sizeof( serv_addr ) );
/* Define the name of this socket. */
strcpy( servaddr.sun_path, PATH );
/* Connect the client's and the server's endpoint. */
connect(client_sd, (struct sockaddr *) &serv_addr, sizeof(serv_addr));
/*sent information to server */
write( client_sd , &send , sizeof( char ) );
/*close connection*/
close(client_sd);

/* TODO: arrange filestream for order */
/* argument managing */
/* TODO: declare sent variable */
/* create clients socket descriptor */
int client_sd;
/* struct for server socket address */
struct sockaddr_un serv_addr;
/* create clients endpoint */
if (client_sd = socket( PF_UNIX, SOCK_STREAM, 0 )== -1 )
fatal("while creating clients socket");
/* socket internal information --- Maybe: AF_LOCAL */
servaddr.sun_family = AF_UNIX;
/* Zero all fields of servaddr. */
bzero( &servaddr, sizeof( serv_addr ) );
/* Define the name of this socket. */
strcpy( servaddr.sun_path, PATH );
/* Connect the client's and the server's endpoint. */
connect(client_sd, (struct sockaddr *) &serv_addr, sizeof(serv_addr));
/*sent information to server */
write( client_sd , &send , sizeof( char ) );
/*close connection*/
close(client_sd);
}
34 changes: 0 additions & 34 deletions client.c~

This file was deleted.

6 changes: 3 additions & 3 deletions pizza_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ int main() {
fatal("while creating server's socket");
unlink(PATH);
/* Zero all fields of servaddr. */
bzero( &serv_addr, sizeof( serv_addr ) );
bzero(&server_addr, addr_len);
/* socket internal information --- Maybe: AF_LOCAL */
server_addr.sun_family = AF_UNIX;
/* Define the name of this socket. */
/* Define the name of this socket */
strcpy(server_addr.sun_path, PATH);
/* bind function call with typecasted arguments of server address */
/* third argument may need to be sizeof(server_addr) */
Expand Down Expand Up @@ -169,7 +169,7 @@ int main() {
/* shm_start = shmat(shm_id, NULL, 0); */

/* get in the oven */
cook(order_list);
cook(order_list);
/* get gone */
deliverer();

Expand Down

0 comments on commit 69b7e53

Please sign in to comment.