Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: robotology/blocktest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.6
Choose a base ref
...
head repository: robotology/blocktest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.7
Choose a head ref
  • 6 commits
  • 7 files changed
  • 2 contributors

Commits on Mar 29, 2023

  1. Update publish-docker.yml

    pattacini authored Mar 29, 2023
    Copy the full SHA
    566ce54 View commit details

Commits on Jun 19, 2023

  1. Copy the full SHA
    6d8b613 View commit details
  2. Copy the full SHA
    0cc3e53 View commit details
  3. Update conda-ci.yml

    Nicogene authored Jun 19, 2023
    Copy the full SHA
    05c0185 View commit details
  4. Update conda-ci.yml

    Nicogene authored Jun 19, 2023
    Copy the full SHA
    6ea7e96 View commit details
  5. Update CMakeLists.txt

    Nicogene authored Jun 19, 2023
    Copy the full SHA
    2a9acc3 View commit details
4 changes: 2 additions & 2 deletions .github/workflows/conda-ci.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
build_type: [Release]
os: [macos-latest, windows-2019]
os: [macos-latest, windows-latest]
fail-fast: false

steps:
@@ -51,7 +51,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -G"Visual Studio 16 2019" \
cmake -G"Visual Studio 17 2022" \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
- name: Build and install
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ jobs:
run: |
echo "tag=, latest" >> $GITHUB_OUTPUT
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@main
uses: elgohr/Publish-Docker-Github-Action@v5
env:
ROBOTOLOGY_SUPERBUILD_RELEASE: ${{ inputs.superbuild_release }}
BLOCKTEST_RELEASE: ${{ inputs.blocktest_release }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.5)

project(blockTest
LANGUAGES C CXX
VERSION 2.3.5)
VERSION 2.3.7)

set(CMAKE_AUTOMOC ON)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
9 changes: 5 additions & 4 deletions src/blocktestcore/connection.cpp
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
#include <chrono>

using namespace std::literals::chrono_literals;
using namespace boost::asio::ip;

Connection::Connection(boost::asio::io_service& io_service): socket_(io_service)
{
@@ -24,13 +25,13 @@ void Connection::handleRead(const boost::system::error_code& err,size_t bytes_tr
if(bytes_transferred==0)
{
std::cout<<"Transferred 0"<<std::endl;
}
}
else
{
std::cout<<readBuffer_<<std::endl;;
}
}
start();
}
}
}

tcp::socket& Connection::socket()
@@ -45,5 +46,5 @@ void Connection::start()
boost::bind(&Connection::handleRead,
shared_from_this(),
boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred));
boost::asio::placeholders::bytes_transferred));
}
12 changes: 5 additions & 7 deletions src/blocktestcore/connection.h
Original file line number Diff line number Diff line change
@@ -14,8 +14,6 @@
#include <boost/asio.hpp>
#include <boost/enable_shared_from_this.hpp>

using boost::asio::ip::tcp;

class Connection : public boost::enable_shared_from_this<Connection>
{
public:
@@ -25,18 +23,18 @@ class Connection : public boost::enable_shared_from_this<Connection>
return pointer(new Connection(io_service));
}

tcp::socket& socket();
boost::asio::ip::tcp::socket& socket();

void start();

private:
Connection(boost::asio::io_service& io_service);

void handleWrite(const boost::system::error_code& err,size_t bytes_transferred);
void handleRead(const boost::system::error_code& err,size_t bytes_transferred);
void handleWrite(const boost::system::error_code& err,size_t bytes_transferred);
void handleRead(const boost::system::error_code& err,size_t bytes_transferred);

static const int size_{1024};
char readBuffer_[size_];
boost::asio::streambuf response_;
tcp::socket socket_;
boost::asio::ip::tcp::socket socket_;
};
5 changes: 3 additions & 2 deletions src/blocktestcore/server.cpp
Original file line number Diff line number Diff line change
@@ -6,13 +6,14 @@
#include <chrono>

using namespace std::literals::chrono_literals;
using namespace boost::asio::ip;

Server::Server(boost::asio::io_service& io):io_(io),acceptor_(io, tcp::endpoint(tcp::v4(), 9876))
{
{
}

void Server::init()
{
{
startAccept();
}

7 changes: 2 additions & 5 deletions src/blocktestcore/server.h
Original file line number Diff line number Diff line change
@@ -13,9 +13,6 @@
#pragma once
#include <boost/asio.hpp>
#include "connection.h"

using boost::asio::ip::tcp;

class Server
{
public:
@@ -24,9 +21,9 @@ class Server
private:
const unsigned int port_{9876};
boost::asio::io_service& io_;
tcp::acceptor acceptor_;
boost::asio::ip::tcp::acceptor acceptor_;
Connection::pointer newConnection_;

void startAccept();
void handleAccept(Connection::pointer newConnection,const boost::system::error_code& error);
};