DSIK_C/main.c
Emil Markiewicz 5f86e80252 first commit
2019-10-31 15:18:38 +01:00

28 lines
648 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include "EasySockets.h"
#include "Game.h"
#include "LinkedList.h"
int main() {
setvbuf(stdout, NULL, _IONBF,0);
int socket_id = CreateSocket();
//Connect(socket_id, "0.0.0.0", 12345);
int c = CreateServer(socket_id, 1234);
printf("%d",c);
struct sockaddr_in incoming;
int a = AcceptClient(socket_id, &incoming);
Game* g = CreateNewGame();
g->id=lastGameIndex;
g->name="sadasd";
printf("%d",a);
return 0;
}