//----------------------------------------------------------------------------- // Copyright (c) 1994,1995 Southeastern Universities Research Association, // Continuous Electron Beam Accelerator Facility // // This software was developed under a United States Government license // described in the NOTICE file included as part of this distribution. // //----------------------------------------------------------------------------- // // Description: // RSVC UDP Client // // This is very limited, it only allows update to a single table // Internal CEBAF use only // // Author: Jie Chen // // // // #ifndef _RSVC_UDP_CLIENT_H #define _RSVC_UDP_CLIENT_H #include #include #include #include #ifdef _WIN32 #include #else #include #include #include #include #endif #include #include #include class RSVC_CLASS_SPEC rsvcUdpClient { public: // constructor rsvcUdpClient (void); ~rsvcUdpClient (void); int connect (char* host, unsigned short port); int update (rsvcData& data); int disconnect (void); private: // stream a data object int streamData (rsvcNetData& data); // open udp port int openUdpPort (char* host, unsigned short port); // udp socket struct sockaddr_in udp_addr_; int fd_; // data convertion buffer char obuffer_[RSVC_UDP_BUFFER_SIZE]; }; #endif