C++ Boost Asio Server class
- or -
Post a project like this£250(approx. $313)
- Posted:
- Proposals: 0
- Remote
- #9017
- Expired
Description
Experience Level: Expert
I'd need two base classes for server side and clients, I'd preffer using ASIO or another open source multiplatform library.
Server Side
- Accept and manage 100 to 5000 simultaneos connetionected clients
- Authenticate client with uid and pwd (authenticantion function not need to implement)
- Receive and send text messages only (#define MAXMSGSIZE) trucate messages bigger that MAXMSGSIZE
- Send one message to one client or several clients (max 20 clients at the time) with retry transparent machanism.
- Should consider this class an High availability Mission critical, so a correct memory management and resources utilization is mandatory.
- Server interfaces:
- Constructor (unsigned short port)
- void OnClientAuthentication(char* lpszUid) // virtual override
- void OnClientMessage(char* lpszUid, char* lpszMsg) // virtual override
- void OnClientDisconnect(char* lpszUid) // virtual override
- int AsyncSendMessage(char *lpszUid, char *lpszMsg) // 0 = success, others = ERROR_*
- int AsyncSendMessage(char **lpszUids, unsigned int nClients, char *lpszMsg) 0 = Success, others = ERROR_*
- char **GetActiveConnections() // alloc lpsz array with users Uids
- int DisconnectClient(char *lpszUid) // 0 = success, others = ERROR_*
- int StopAcceptingConnections() // do not accept new connections
- int StartAcceptingConnections() // accept new connections again
Client Side
- Should be able to manage transparently the server connection and reconnect automatically if connection lost.
- Receive and send text messages only (#define MAXMSGSIZE) trucate messages bigger that MAXMSGSIZE
- Client interfaces:
- Constructor (char *lpszServer, unsigned short lPort, char *lpszUid, char *lpszPwd)
- void OnServerMessage(char* lpszUid, char* lpszMsg) // virtual override
- int AsyncSendMessage(char *lpszUid, char *lpszMsg) // 0 = success, others = ERROR_*
- int Connect() // 0 = SUCCESS (or already connected), other = ERROR_*
- int Disconnect() // 0 = SUCCESS (or already disconnected), other = ERROR_*
Deliverables:
- Classes Source code (.h and .cpp) fully documented functions and params
- Working examples using classes that derive from the required above.
Considerations:
I'm focussed on the data and application logic layers. Right now I don't have the time to work on the examples found in the net and create this class, so I'll need a simple but solid solution using C++ Boost-Asio libs (or another open source lib that the developer may consider better for this purpose).
Server Side
- Accept and manage 100 to 5000 simultaneos connetionected clients
- Authenticate client with uid and pwd (authenticantion function not need to implement)
- Receive and send text messages only (#define MAXMSGSIZE) trucate messages bigger that MAXMSGSIZE
- Send one message to one client or several clients (max 20 clients at the time) with retry transparent machanism.
- Should consider this class an High availability Mission critical, so a correct memory management and resources utilization is mandatory.
- Server interfaces:
- Constructor (unsigned short port)
- void OnClientAuthentication(char* lpszUid) // virtual override
- void OnClientMessage(char* lpszUid, char* lpszMsg) // virtual override
- void OnClientDisconnect(char* lpszUid) // virtual override
- int AsyncSendMessage(char *lpszUid, char *lpszMsg) // 0 = success, others = ERROR_*
- int AsyncSendMessage(char **lpszUids, unsigned int nClients, char *lpszMsg) 0 = Success, others = ERROR_*
- char **GetActiveConnections() // alloc lpsz array with users Uids
- int DisconnectClient(char *lpszUid) // 0 = success, others = ERROR_*
- int StopAcceptingConnections() // do not accept new connections
- int StartAcceptingConnections() // accept new connections again
Client Side
- Should be able to manage transparently the server connection and reconnect automatically if connection lost.
- Receive and send text messages only (#define MAXMSGSIZE) trucate messages bigger that MAXMSGSIZE
- Client interfaces:
- Constructor (char *lpszServer, unsigned short lPort, char *lpszUid, char *lpszPwd)
- void OnServerMessage(char* lpszUid, char* lpszMsg) // virtual override
- int AsyncSendMessage(char *lpszUid, char *lpszMsg) // 0 = success, others = ERROR_*
- int Connect() // 0 = SUCCESS (or already connected), other = ERROR_*
- int Disconnect() // 0 = SUCCESS (or already disconnected), other = ERROR_*
Deliverables:
- Classes Source code (.h and .cpp) fully documented functions and params
- Working examples using classes that derive from the required above.
Considerations:
I'm focussed on the data and application logic layers. Right now I don't have the time to work on the examples found in the net and create this class, so I'll need a simple but solid solution using C++ Boost-Asio libs (or another open source lib that the developer may consider better for this purpose).
Fernando M.
0% (0)Projects Completed
-
Freelancers worked with
-
Projects awarded
0%
Last project
25 Apr 2024
Portugal
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies