⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 socket_server_base.hh

📁 xorp源码hg
💻 HH
📖 第 1 页 / 共 2 页
字号:
	const string&	optname,	const uint32_t&	optval) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Get a named socket option.     *     *  @param sockid unique socket id.     *     *  @param optname name of option to be set. Valid values are documented in     *  set_socket_option.     *     *  @param optval value of option to be set. If value is logically boolean     *  then zero represents false and any non-zero value true.     */    virtual XrlCmdError socket4_0_1_get_socket_option(	// Input values,	const string&	sockid,	const string&	optname,	// Output values,	uint32_t&	optval) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Create a bound TCP socket.     *     *  @param creator the Xrl Target instance name of the socket creator. The     *  named target must implement socket6_user/0.1.     *     *  @param local_addr the interface address to bind socket to.     *     *  @param local_port the port to bind socket to.     *     *  @param is_blocking if true then the socket will be blocking, otherwise     *  non-blocking.     *     *  @param sockid return parameter that contains unique socket id when     *  socket instantiation is successful.     */    virtual XrlCmdError socket6_0_1_tcp_open_and_bind(	// Input values,	const string&	creator,	const IPv6&	local_addr,	const uint32_t&	local_port,	const bool&	is_blocking,	// Output values,	string&	sockid) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Create a bound UDP socket.     *     *  @param creator the Xrl Target instance name of the socket creator. The     *  named target must implement socket6_user/0.1.     *     *  @param local_addr the interface address to bind socket to.     *     *  @param local_port the port to bind socket to.     *     *  @param is_blocking if true then the socket will be blocking, otherwise     *  non-blocking.     *     *  @param sockid return parameter that contains unique socket id when     *  socket instantiation is successful.     */    virtual XrlCmdError socket6_0_1_udp_open_and_bind(	// Input values,	const string&	creator,	const IPv6&	local_addr,	const uint32_t&	local_port,	const bool&	is_blocking,	// Output values,	string&	sockid) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Create a bound UDP multicast socket.     *     *  @param creator the Xrl Target instance name of the socket creator. The     *  named target must implement socket6_user/0.1.     *     *  @param local_addr the interface address to bind socket to.     *     *  @param local_port the port to bind socket to.     *     *  @param mcast_addr the multicast group address to join.     *     *  @param ttl the ttl to use for this multicast socket.     *     *  @param reuse allow other sockets to bind to same multicast group.     *     *  @param is_blocking if true then the socket will be blocking, otherwise     *  non-blocking.     *     *  @param sockid return parameter that contains unique socket id when     *  socket instantiation is successful.     */    virtual XrlCmdError socket6_0_1_udp_open_bind_join(	// Input values,	const string&	creator,	const IPv6&	local_addr,	const uint32_t&	local_port,	const IPv6&	mcast_addr,	const uint32_t&	ttl,	const bool&	reuse,	const bool&	is_blocking,	// Output values,	string&	sockid) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Create a bound and connected TCP socket.     *     *  @param creator the Xrl Target instance name of the socket creator. The     *  named target must implement socket6_user/0.1.     *     *  @param local_addr the interface address to bind socket to.     *     *  @param local_port the port to bind socket to.     *     *  @param remote_addr the address to connect to.     *     *  @param remote_port the remote port to connect to.     *     *  @param is_blocking if true then the socket will be blocking, otherwise     *  non-blocking.     *     *  @param sockid return parameter that contains unique socket id when     *  socket instantiation is successful.     */    virtual XrlCmdError socket6_0_1_tcp_open_bind_connect(	// Input values,	const string&	creator,	const IPv6&	local_addr,	const uint32_t&	local_port,	const IPv6&	remote_addr,	const uint32_t&	remote_port,	const bool&	is_blocking,	// Output values,	string&	sockid) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Create a bound and connected UDP socket.     *     *  @param creator the Xrl Target instance name of the socket creator. The     *  named target must implement socket6_user/0.1.     *     *  @param local_addr the interface address to bind socket to.     *     *  @param local_port the port to bind socket to.     *     *  @param remote_addr the address to connect to.     *     *  @param remote_port the remote port to connect to.     *     *  @param is_blocking if true then the socket will be blocking, otherwise     *  non-blocking.     *     *  @param sockid return parameter that contains unique socket id when     *  socket instantiation is successful.     */    virtual XrlCmdError socket6_0_1_udp_open_bind_connect(	// Input values,	const string&	creator,	const IPv6&	local_addr,	const uint32_t&	local_port,	const IPv6&	remote_addr,	const uint32_t&	remote_port,	const bool&	is_blocking,	// Output values,	string&	sockid) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Join multicast group on already bound socket.     *     *  @param sockid unique socket id.     *     *  @param mcast_addr group to join.     *     *  @param join_if_addr interface address to perform join on.     */    virtual XrlCmdError socket6_0_1_udp_join_group(	// Input values,	const string&	sockid,	const IPv6&	mcast_addr,	const IPv6&	join_if_addr) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Leave multicast group on already bound socket.     *     *  @param sockid unique socket id.     *     *  @param mcast_addr group to leave.     *     *  @param leave_if_addr interface address to perform leave on.     */    virtual XrlCmdError socket6_0_1_udp_leave_group(	// Input values,	const string&	sockid,	const IPv6&	mcast_addr,	const IPv6&	leave_if_addr) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Close socket.     *     *  @param sockid unique socket id of socket to be closed.     */    virtual XrlCmdError socket6_0_1_close(	// Input values,	const string&	sockid) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Listen for inbound connections on socket. When a connection request     *  received the socket creator will receive notification through     *  socket6_user/0.1/connect_event.     *     *  @param sockid the unique socket id of the socket to perform listen.     *     *  @param backlog the maximum number of pending connections.     */    virtual XrlCmdError socket6_0_1_tcp_listen(	// Input values,	const string&	sockid,	const uint32_t&	backlog) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Send data on socket.     *     *  @param sockid unique socket id.     *     *  @param data block of data to be sent.     */    virtual XrlCmdError socket6_0_1_send(	// Input values,	const string&	sockid,	const vector<uint8_t>&	data) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Send data on socket with optional flags. These flags provide hints to     *  the forwarding engine on how to send the packets, they are not     *  guaranteed to work. NB: There is no flag for "do not route" as this is     *  always true since the particular forwarding engine sending the data may     *  not have access to the full routing table.     *     *  @param sockid unique socket id.     *     *  @param data block of data to be sent.     *     *  @param out_of_band mark data as out of band.     *     *  @param end_of_record data completes record.     *     *  @param end_of_file data completes file.     */    virtual XrlCmdError socket6_0_1_send_with_flags(	// Input values,	const string&	sockid,	const vector<uint8_t>&	data,	const bool&	out_of_band,	const bool&	end_of_record,	const bool&	end_of_file) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Send data on socket to a given destination. The packet is not routed as     *  the forwarding engine sending the packet may not have access to the     *  full routing table.     *     *  @param sockid unique socket id.     *     *  @param remote_addr destination address for data.     *     *  @param remote_port destination port for data.     *     *  @param data block of data to be sent.     */    virtual XrlCmdError socket6_0_1_send_to(	// Input values,	const string&	sockid,	const IPv6&	remote_addr,	const uint32_t&	remote_port,	const vector<uint8_t>&	data) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Send data on socket to a given destination. The packet is not routed as     *  the forwarding engine sending the packet may not have access to the     *  full routing table.     *     *  @param sockid unique socket id.     *     *  @param remote_addr destination address for data.     *     *  @param remote_port destination port for data.     *     *  @param data block of data to be sent.     *     *  @param out_of_band mark data as out of band.     *     *  @param end_of_record data completes record.     *     *  @param end_of_file data completes file.     */    virtual XrlCmdError socket6_0_1_send_to_with_flags(	// Input values,	const string&	sockid,	const IPv6&	remote_addr,	const uint32_t&	remote_port,	const vector<uint8_t>&	data,	const bool&	out_of_band,	const bool&	end_of_record,	const bool&	end_of_file) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Send data on socket to a given multicast group from a given interface.     *     *  @param sockid unique socket id.     *     *  @param group_addr destination address for data.     *     *  @param group_port destination port for data.     *     *  @param ifaddr interface address     */    virtual XrlCmdError socket6_0_1_send_from_multicast_if(	// Input values,	const string&	sockid,	const IPv6&	group_addr,	const uint32_t&	group_port,	const IPv6&	ifaddr,	const vector<uint8_t>&	data) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Set a named socket option.     *     *  @param sockid unique socket id.     *     *  @param optname name of option to be set. Valid values are:     *  "multicast_loopback" "multicast_hops"     *     *  @param optval value of option to be set. If value is logically boolean     *  then zero represents false and any non-zero value true.     */    virtual XrlCmdError socket6_0_1_set_socket_option(	// Input values,	const string&	sockid,	const string&	optname,	const uint32_t&	optval) = 0;    /**     *  Pure-virtual function that needs to be implemented to:     *     *  Get a named socket option.     *     *  @param sockid unique socket id.     *     *  @param optname name of option to be set. Valid values are documented in     *  set_socket_option.     *     *  @param optval value of option to be set. If value is logically boolean     *  then zero represents false and any non-zero value true.     */    virtual XrlCmdError socket6_0_1_get_socket_option(	// Input values,	const string&	sockid,	const string&	optname,	// Output values,	uint32_t&	optval) = 0;private:    const XrlCmdError handle_common_0_1_get_target_name(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_common_0_1_get_version(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_common_0_1_get_status(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_common_0_1_shutdown(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_finder_event_observer_0_1_xrl_target_birth(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_finder_event_observer_0_1_xrl_target_death(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_tcp_open_and_bind(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_udp_open_and_bind(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_udp_open_bind_join(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_tcp_open_bind_connect(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_udp_open_bind_connect(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_udp_join_group(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_udp_leave_group(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_close(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_tcp_listen(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_send(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_send_with_flags(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_send_to(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_send_to_with_flags(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_send_from_multicast_if(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_set_socket_option(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket4_0_1_get_socket_option(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_tcp_open_and_bind(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_udp_open_and_bind(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_udp_open_bind_join(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_tcp_open_bind_connect(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_udp_open_bind_connect(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_udp_join_group(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_udp_leave_group(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_close(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_tcp_listen(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_send(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_send_with_flags(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_send_to(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_send_to_with_flags(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_send_from_multicast_if(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_set_socket_option(const XrlArgs& in, XrlArgs* out);    const XrlCmdError handle_socket6_0_1_get_socket_option(const XrlArgs& in, XrlArgs* out);    void add_handlers();    void remove_handlers();};#endif // __XRL_TARGETS_SOCKET_SERVER_BASE_HH__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -