Showing
8 changed files
with
118 additions
and
0 deletions
Client.c
0 → 100644
Client.h
0 → 100644
Makefile
0 → 100644
... | @@ -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 | }; | ... | ... |
Server.c
0 → 100644
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 | +} |
Server.h
0 → 100644
main.c
0 → 100644
-
Please register or login to post a comment