原创 boost::asio 序列16: tcp::socket 和 udp::socket & socket_basic

           reactive_socket_service_base          execution_context_service_base <reative_socket_service<Porotocol>>    

原创 VTK顯示多邊形平面

#ifndef VTKHSWPOLYGONWIDGET_H #define VTKHSWPOLYGONWIDGET_H /* * ModuleName: vtkHSWPolygonWidget * Description: 實現多

原创 boost::asio序列: 計時器

以下兩個示例都是使用計時器的例子,超時時長設置爲5秒 1. 使用計時器同步等待超時 #include <iostream> #include <boost/asio.hpp> #include <boost/date_time/posi

原创 VTK顯示圓圈

#ifndef VTKHSWCIRCLEWIDGET_H #define VTKHSWCIRCLEWIDGET_H /* * ModuleName: vtkHSWCircleWidget * Description: 實現圓形

原创 boost::asio 序列15: basic_socket

explicit basic_socket(const executor_type& ex) 創建&未打開的socket   template <typename ExecutionContext>   explicit bas

原创 boost::asio序列9: service_register

 主要用於service註冊,其中,註冊的key爲execution_context::service::key類型: friend class boost::asio::detail::service_registry; st

原创 boost::asio序列4: execution_contex

1. execution_context execution_context_service_base execution_context::service: 內部類 service_id execution_context::id: 內

原创 boost::asio序列2:execution_context

class io_context : public execution_context execution_context是io_context的基類,表示函數對象執行的上下文。 execution_context代表函數對象執行的

原创 VTK顯示折線

#ifndef VTKHSWPOLYLINEWIDGET_H #define VTKHSWPOLYLINEWIDGET_H /* * ModuleName: vtkHSWPolylineWidget * Description:

原创 boost::asio序列12: epoll_reactor

epoll_reactor中調用epoll_wait(....)實現I/O事件的監聽,對於ready的事件,加入道ops中,等待調度器分配和執行 void epoll_reactor::run(long usec, op_queue<o

原创 boost::asio 序列8: io_context::service

io_context::service繼承execution_context::service: (1) 主要的函數在於調用基類execution_context::service的shutdown_service(),用於關閉全部的io

原创 Boost::asio序列1: io_context

支持異步I/O功能 Boost::asio::io_context是異步I/O的核心功能,io_context提供用戶的異步I/O對象的的核心I/O功能,包含: (1) boost::asio::ip::tcp::socket (2) b

原创 VTK顯示球體

#ifndef VTKHSWSPHEREWIDGET_H #define VTKHSWSPHEREWIDGET_H /* * ModuleName: vtkHSWSphereWidget * Description: 實現球 *

原创 boost::asio序列11: scheduler

scheduler主要用於實現linux系統下的異步I/O對應的Handler分配,通過epoll_reactor實現調度 class scheduler : public execution_context_service_bas

原创 boost::asio序列13: io_object_executor

 實現I/O handler的投遞 // Wrap the (potentially polymorphic) executor so that we can bypass it when // dispatching on a tar