vala 编写一个异步http服务器示例代码
代码语言:vala
所属分类:通讯
代码描述:vala 编写一个异步http服务器示例代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
bool on_incoming_connection (SocketConnection conn) { stdout.printf ("Got incoming connection\n"); // Process the request asynchronously process_request.begin (conn); return true; } async void process_request (SocketConnection conn) { try { var dis = new DataInputStream (conn.input_stream); var dos = new DataOutputStream (conn.output_stream); string req = yield dis.read_line_async (Priority.HIGH_ID.........完整代码请登录后点击上方下载按钮下载查看
网友评论0