C++的Web應用服務器 Tntnet
Tntnet 是一個 Web 應用服務器,可使用 C++ 來編寫 Web 應用,可直接在 HTML 頁面上編寫 C++ 代碼。完全多線程,支持 HTTP keep-alive ,其動態頁面幾乎跟靜態頁面的性能一樣。
示例頁面:
<#
this is a simple hello-world-application
#>
<%args>
name; // define query-parameter
// this defines a variable of type std::string with
// the name "name"
</%args>
<html>
<head>
<title>Hello World-application for tntnet</title>
</head>
<body bgcolor="#FFFFFF">
<img src="tntnet.jpg" align="right">
<h1>Hello <$ name.empty() ? "World" : name $></h1>
<form>
What's your name?
<input type="text" name="name" value="<$name$>"> <br>
<input type="submit">
</form>
</body>
</html> 本文由用戶 openkk 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!