28 lines
648 B
C
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;
|
|
|
|
} |