Hello all, I try again in this thread i do like this case CMD_PASV: { std::string out = "227 Entering Passive Mode (" + sip + ")\r\n"; m_data_con = data_connection_ptr(new axftp::server::data_connection(port)); m_thread = boost::thread(boost::bind(&axftp::server::data_connection::start, m_data_con)); boost::asio::write(*_sock, boost::asio::buffer(out, out.size()), e); } break; class data_connection is like this data_connection::data_connection(size_t port) : _port(port) { } void data_connection::start() { boost::asio::io_service io_service; boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), _port); boost::asio::ip::tcp::acceptor acceptor(io_service, endpoint); boost::asio::ip::tcp::socket socket(io_service); acceptor.accept(socket); // std::string message("Hello from server\n"); boost::asio::write(socket, boost::asio::buffer(message)); socket.close(); . } Never got a connection to the data_connection nothing happends in th acceptor.accept (socket) what do i do wrong appreciate any help Thanks Christer
participants (1)
-
Christer Borgqvist