HttpConnection.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3/****************************************************************************
4** Copyright (c) 2001-2014
5**
6** This file is part of the QuickFIX FIX Engine
7**
8** This file may be distributed under the terms of the quickfixengine.org
9** license as defined by quickfixengine.org and appearing in the file
10** LICENSE included in the packaging of this file.
11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14**
15** See http://www.quickfixengine.org/LICENSE for licensing information.
16**
17** Contact ask@quickfixengine.org if any conditions of this licensing are
18** not clear to you.
19**
20****************************************************************************/
21
22#ifndef FIX_HTTPCONNECTION_H
23#define FIX_HTTPCONNECTION_H
24
25#ifdef _MSC_VER
26#pragma warning( disable : 4503 4355 4786 4290 )
27#endif
28
29#include "HttpParser.h"
30#include <stdio.h>
31
32namespace FIX
33{
34class HttpMessage;
35
38{
39public:
40 HttpConnection( int s );
41
42 int getSocket() const { return m_socket; }
43 bool read();
44
45private:
46 bool readMessage( std::string& msg ) throw( SocketRecvFailed );
47 void processStream();
48 void processRequest( const HttpMessage& );
49 void processRoot( const HttpMessage&, std::stringstream& h, std::stringstream& b );
50 void processResetSessions( const HttpMessage&, std::stringstream& h, std::stringstream& b );
51 void processRefreshSessions( const HttpMessage&, std::stringstream& h, std::stringstream& b );
52 void processEnableSessions( const HttpMessage&, std::stringstream& h, std::stringstream& b );
53 void processDisableSessions( const HttpMessage&, std::stringstream& h, std::stringstream& b );
54 void processSession( const HttpMessage&, std::stringstream& h, std::stringstream& b );
55 void processResetSession( const HttpMessage&, std::stringstream& h, std::stringstream& b );
56 void processRefreshSession( const HttpMessage&, std::stringstream& h, std::stringstream& b );
57
59 ( std::stringstream& s, const std::string& name, bool value, const std::string& url );
60 void showRow
61 ( std::stringstream& s, const std::string& name, bool value, const std::string& url = "" );
62 void showRow
63 ( std::stringstream& s, const std::string& name, const std::string& value, const std::string& url = "" );
64 void showRow
65 ( std::stringstream& s, const std::string& name, int value, const std::string& url = "" );
66
67 bool send( const std::string& );
68 void disconnect( int error = 0 );
69
71 char m_buffer[BUFSIZ];
72
74 fd_set m_fds;
75};
76}
77
78#endif
Encapsulates a HTTP socket file descriptor.
void processRoot(const HttpMessage &, std::stringstream &h, std::stringstream &b)
void processDisableSessions(const HttpMessage &, std::stringstream &h, std::stringstream &b)
void processRefreshSession(const HttpMessage &, std::stringstream &h, std::stringstream &b)
void processEnableSessions(const HttpMessage &, std::stringstream &h, std::stringstream &b)
void processResetSession(const HttpMessage &, std::stringstream &h, std::stringstream &b)
void processRequest(const HttpMessage &)
void processSession(const HttpMessage &, std::stringstream &h, std::stringstream &b)
char m_buffer[BUFSIZ]
bool readMessage(std::string &msg)
void disconnect(int error=0)
bool send(const std::string &)
void processResetSessions(const HttpMessage &, std::stringstream &h, std::stringstream &b)
void showRow(std::stringstream &s, const std::string &name, bool value, const std::string &url="")
void processRefreshSessions(const HttpMessage &, std::stringstream &h, std::stringstream &b)
void showToggle(std::stringstream &s, const std::string &name, bool value, const std::string &url)
HTTP Message that implemented GET functionality.
Definition HttpMessage.h:38
Parses HTTP messages off an input stream.
Definition HttpParser.h:37
Socket recv operation failed.
Definition Exceptions.h:279

Generated on Mon Mar 4 2024 21:10:02 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001