강현태

init

1 +//
2 +// Client.c
3 +// RandomChat
4 +//
5 +// Created by 강현태 on 2017. 12. 20..
6 +// Copyright © 2017년 KHU. All rights reserved.
7 +//
8 +
9 +#include "Client.h"
1 +//
2 +// Client.h
3 +// RandomChat
4 +//
5 +// Created by 강현태 on 2017. 12. 20..
6 +// Copyright © 2017년 KHU. All rights reserved.
7 +//
8 +
9 +#ifndef Client_h
10 +#define Client_h
11 +
12 +#include <stdio.h>
13 +
14 +#endif /* Client_h */
1 +CC = gcc
2 +
3 +main : main.o Server.o
4 + $(CC) -o $@ $<
5 +
6 +main.o : Server.h main.c
7 + gcc -c -o $^
8 +
9 +Server.o : Server.h Server.c
10 + gcc -c -o $^
11 +
12 +clean :
13 + rm -f $(all)
...@@ -6,10 +6,27 @@ ...@@ -6,10 +6,27 @@
6 objectVersion = 48; 6 objectVersion = 48;
7 objects = { 7 objects = {
8 8
9 +/* Begin PBXFileReference section */
10 + 61D9C4A11FE94CD3000D9240 /* Server.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = Server.c; sourceTree = "<group>"; usesTabs = 1; };
11 + 61D9C4A21FE94DD3000D9240 /* main.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = main.h; sourceTree = "<group>"; };
12 + 61D9C4A31FE94DD3000D9240 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; usesTabs = 1; };
13 + 61D9C4A41FE95072000D9240 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; usesTabs = 1; };
14 + 61D9C4AB1FEA6390000D9240 /* Server.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Server.h; sourceTree = "<group>"; };
15 + 61D9C4AC1FEA639F000D9240 /* Client.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Client.h; sourceTree = "<group>"; };
16 + 61D9C4AD1FEA639F000D9240 /* Client.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = Client.c; sourceTree = "<group>"; };
17 +/* End PBXFileReference section */
18 +
9 /* Begin PBXGroup section */ 19 /* Begin PBXGroup section */
10 6102FFC01FE94C7C0021C471 = { 20 6102FFC01FE94C7C0021C471 = {
11 isa = PBXGroup; 21 isa = PBXGroup;
12 children = ( 22 children = (
23 + 61D9C4AC1FEA639F000D9240 /* Client.h */,
24 + 61D9C4AD1FEA639F000D9240 /* Client.c */,
25 + 61D9C4AB1FEA6390000D9240 /* Server.h */,
26 + 61D9C4A11FE94CD3000D9240 /* Server.c */,
27 + 61D9C4A21FE94DD3000D9240 /* main.h */,
28 + 61D9C4A31FE94DD3000D9240 /* main.c */,
29 + 61D9C4A41FE95072000D9240 /* Makefile */,
13 ); 30 );
14 sourceTree = "<group>"; 31 sourceTree = "<group>";
15 }; 32 };
......
1 +//
2 +// Server.c
3 +// RandomChat
4 +//
5 +// Created by 강현태 on 2017. 12. 19..
6 +// Copyright © 2017년 KHU. All rights reserved.
7 +//
8 +
9 +#include "Server.h"
10 +
11 +int openServer(){
12 + int serverSock;
13 + struct sockaddr_in servAddr;
14 +
15 + if((serverSock=socket(PF_INET,SOCK_STREAM,0))<0){
16 + return -1;
17 + }
18 +
19 + bzero(&servAddr,sizeof(servAddr));
20 +
21 +
22 + return 1;
23 +}
1 +//
2 +// Server.h
3 +// RandomChat
4 +//
5 +// Created by 강현태 on 2017. 12. 20..
6 +// Copyright © 2017년 KHU. All rights reserved.
7 +//
8 +
9 +#ifndef Server_h
10 +#define Server_h
11 +
12 +
13 +#endif /* Server_h */
1 +//
2 +// main.c
3 +// RandomChat
4 +//
5 +// Created by 강현태 on 2017. 12. 19..
6 +// Copyright © 2017년 KHU. All rights reserved.
7 +//
8 +
9 +#include "main.h"
10 +
11 +int main(){
12 +
13 + return 0;
14 +}
1 +//
2 +// main.h
3 +// RandomChat
4 +//
5 +// Created by 강현태 on 2017. 12. 19..
6 +// Copyright © 2017년 KHU. All rights reserved.
7 +//
8 +
9 +#ifndef main_h
10 +#define main_h
11 +
12 +#include <stdio.h>
13 +#include "Server.h"
14 +
15 +#endif /* main_h */