1 | /* Virginia Tech Cognitive Radio Open Source Systems |
---|
2 | * Virginia Tech, 2009 |
---|
3 | * |
---|
4 | * TODO LICENSE INFORMATION GOES HERE |
---|
5 | */ |
---|
6 | |
---|
7 | /* TODO DESCRIPTION OF FILE. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef SOCKET_COMM_H |
---|
11 | #define SOCKET_COMM_H |
---|
12 | |
---|
13 | #include <stdint.h> |
---|
14 | |
---|
15 | #include "vtcross/containers.h" |
---|
16 | |
---|
17 | |
---|
18 | /* TODO |
---|
19 | */ |
---|
20 | void ReadMessage(int32_t socketFD, char* msgBuffer); |
---|
21 | |
---|
22 | |
---|
23 | /* TODO |
---|
24 | */ |
---|
25 | //int32_t SendMessage(int32_t socketFD, char* message); |
---|
26 | int32_t SendMessage(int32_t socketFD, const char* message) ; |
---|
27 | |
---|
28 | |
---|
29 | /* TODO |
---|
30 | */ |
---|
31 | int32_t GetParameter(int32_t socketFD, struct Parameter pList[], \ |
---|
32 | struct CE_Info *ce_info); |
---|
33 | |
---|
34 | |
---|
35 | /* TODO |
---|
36 | */ |
---|
37 | int32_t GetRequest(int32_t socketFD, struct Parameter pList[], \ |
---|
38 | struct CE_Info *ce_info); |
---|
39 | |
---|
40 | |
---|
41 | /* TODO |
---|
42 | * This is meant as the future replacement for the function below it. It is |
---|
43 | * still a work in progress, and needs a code-review before we move to it |
---|
44 | * entirely. |
---|
45 | */ |
---|
46 | void CreateClientSocket(struct RemoteComponent* serverInfo); |
---|
47 | |
---|
48 | |
---|
49 | /* This is the original function that does what the above function is supposed |
---|
50 | * to do. |
---|
51 | */ |
---|
52 | int32_t ClientSocket(const char* serverName, const char* portNumber); |
---|
53 | |
---|
54 | |
---|
55 | /* TODO |
---|
56 | */ |
---|
57 | int32_t AcceptTCPConnection(int32_t servSock); |
---|
58 | |
---|
59 | |
---|
60 | /* TODO |
---|
61 | */ |
---|
62 | int32_t CreateTCPServerSocket(uint16_t port); |
---|
63 | |
---|
64 | |
---|
65 | /* TODO |
---|
66 | */ |
---|
67 | void HandleTCPClient(int32_t socketfd, Utility* uList[], Parameter* pList[], \ |
---|
68 | Observable* oList[], CE_Info* ce_info); |
---|
69 | |
---|
70 | #endif |
---|