mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
squelch http startup warning
This commit is contained in:
parent
5adf68ebc5
commit
c17b13ed0b
@ -22,11 +22,13 @@
|
||||
|
||||
|
||||
#define SOURCES \
|
||||
config_http.h \
|
||||
http_connection.h \
|
||||
http_request.h
|
||||
|
||||
|
||||
#define INCLUDED_SOURCES \
|
||||
config_http.cxx \
|
||||
http_connection.cxx \
|
||||
parsedhttprequest.cxx \
|
||||
http_request.cxx
|
||||
|
46
direct/src/http/config_http.cxx
Normal file
46
direct/src/http/config_http.cxx
Normal file
@ -0,0 +1,46 @@
|
||||
// Filename: config_http.cxx
|
||||
// Created by: drose (15Mar09)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
||||
//
|
||||
// All use of this software is subject to the terms of the revised BSD
|
||||
// license. You should have received a copy of this license along
|
||||
// with this source code in a file named "LICENSE."
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "config_http.h"
|
||||
#include "http_connection.h"
|
||||
#include "http_request.h"
|
||||
#include "dconfig.h"
|
||||
|
||||
Configure(config_http);
|
||||
NotifyCategoryDef(http, "");
|
||||
|
||||
ConfigureFn(config_http) {
|
||||
init_libhttp();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libhttp
|
||||
// Description: Initializes the library. This must be called at
|
||||
// least once before any of the functions or classes in
|
||||
// this library can be used. Normally it will be
|
||||
// called by the static initializers and need not be
|
||||
// called explicitly, but special cases exist.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void
|
||||
init_libhttp() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
HttpConnection::init_type();
|
||||
Http_Request::init_type();
|
||||
}
|
||||
|
27
direct/src/http/config_http.h
Normal file
27
direct/src/http/config_http.h
Normal file
@ -0,0 +1,27 @@
|
||||
// Filename: config_http.h
|
||||
// Created by: drose (15Mar09)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
||||
//
|
||||
// All use of this software is subject to the terms of the revised BSD
|
||||
// license. You should have received a copy of this license along
|
||||
// with this source code in a file named "LICENSE."
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CONFIG_HTTP_H
|
||||
#define CONFIG_HTTP_H
|
||||
|
||||
#include "directbase.h"
|
||||
#include "notifyCategoryProxy.h"
|
||||
|
||||
NotifyCategoryDecl(http, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||
|
||||
extern EXPCL_DIRECT void init_libhttp();
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "http_connection.cxx"
|
||||
#include "parsedhttprequest.cxx"
|
||||
#include "http_request.cxx"
|
||||
#include "config_http.cxx"
|
||||
#include "http_connection.cxx"
|
||||
#include "parsedhttprequest.cxx"
|
||||
#include "http_request.cxx"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "http_connection.h"
|
||||
|
||||
TypeHandle HttpConnection::_type_handle;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
HttpConnection::HttpConnection(SOCKET sck,Socket_Address &inaddr) :
|
||||
_Timer(Time_Span(10,0)) ,
|
||||
|
@ -52,6 +52,23 @@ public:
|
||||
virtual CloseState TryAndFinalize() { _state = WRITING_DATA; ;return ConnectionDoNotClose; };
|
||||
|
||||
std::string GetFullmessage() { return _headerDetail + _bodyDetail; };
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
Socket_TCP::init_type();
|
||||
register_type(_type_handle, "HttpConnection",
|
||||
Socket_TCP::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "http_request.h"
|
||||
|
||||
TypeHandle Http_Request::_type_handle;
|
||||
|
||||
typedef BaseIncomingSet< Http_Request , Socket_TCP_Listen , char [10240], char *> Http_Source_BaseIncomingSet;
|
||||
std::set< Http_Request * > Global_WebRequests_pendingNotify;
|
||||
|
@ -97,7 +97,22 @@ PUBLISHED:
|
||||
static bool HttpManager_Initialize( unsigned short port);
|
||||
static Http_Request * HttpManager_GetARequest();
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
HttpConnection::init_type();
|
||||
register_type(_type_handle, "Http_Request",
|
||||
HttpConnection::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user