root/vtcross/trunk/src/include/vtcross/socketcomm.h @ 184

Revision 184, 1.3 KB (checked in by bhilburn, 15 years ago)

Added a new CreateClientSocket? function, using the new RemoteComponent? struct
type, to replace the old ClientSocket? function. Note that the old function is
left in until the new stuff gets tested and reviewed.

Line 
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 */
20void ReadMessage(int32_t socketFD, char* msgBuffer);
21
22
23/* TODO
24 */
25//int32_t SendMessage(int32_t socketFD, char* message);
26int32_t SendMessage(int32_t socketFD, const char* message) ;
27
28
29/* TODO
30 */
31int32_t GetParameter(int32_t socketFD, struct Parameter pList[], \
32        struct CE_Info *ce_info);
33
34
35/* TODO
36 */
37int32_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 */
46void CreateClientSocket(struct RemoteComponent* serverInfo);
47
48
49/* This is the original function that does what the above function is supposed
50 * to do.
51 */
52int32_t ClientSocket(const char* serverName, const char* portNumber);
53
54
55/* TODO
56 */
57int32_t  AcceptTCPConnection(int32_t servSock);
58
59
60/* TODO
61 */
62int32_t CreateTCPServerSocket(uint16_t port);
63
64
65/* TODO
66 */
67void HandleTCPClient(int32_t socketfd, Utility* uList[], Parameter* pList[], \
68        Observable* oList[], CE_Info* ce_info);
69
70#endif
Note: See TracBrowser for help on using the browser.