-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServer.cpp
More file actions
28 lines (24 loc) · 793 Bytes
/
Server.cpp
File metadata and controls
28 lines (24 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// #include "Server.h"
// namespace ly
// {
// /**
// * @brief Construct a new udp server::udp server object
// *
// * @param port 端口号
// */
// UDP_Server::UDP_Server(unsigned short port)
// : socket_(io_service_, boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), port))
// {
// std::cout << "UDP server started at port " << port << "." << std::endl;
// }
// void UDP_Server::write(PoseDataFrame &poseDataFrame)
// {
// memcpy(posedata, &poseDataFrame, sizeof(PoseDataFrame));
// socket_.send_to(boost::asio::buffer(posedata), remote_endpoint_);
// }
// UDP_Server::~UDP_Server()
// {
// socket_.close();
// std::cout << "UDP server stopped." << std::endl;
// }
// }