00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __OpenSdkEndpointInfo_h__
00023 #define __OpenSdkEndpointInfo_h__
00024
00025 #include <OPENR/OPENR.h>
00026 #include <ant.h>
00027 #include <IPAddress.h>
00028 #include <DNSEndpointMsg.h>
00029 #include <pthread.h>
00030
00031 #define NO_SOCKET -1
00032
00033
00034 class OpenSdkEndpointInfo
00035 {
00036
00037 public:
00038
00039 OpenSdkEndpointInfo();
00040 OpenSdkEndpointInfo(OpenSdkEndpointInfo&);
00041 ~OpenSdkEndpointInfo();
00042
00043 enum State {
00044 NEW,
00045 LISTENING,
00046 CONNECTING,
00047 BINDING,
00048 ACTIVE,
00049 CLOSED
00050 } state;
00051
00052 antEnvMsg *msg;
00053 OServiceEntry entry;
00054
00055 int server_socket;
00056 int socket;
00057
00058 void *buffer;
00059 size_t size;
00060
00061
00062 short port;
00063 IPAddress ip;
00064
00065
00066 pthread_mutex_t *listen_mutex;
00067
00068
00069 char *hostname;
00070
00071 };
00072
00073 #endif