updated with neccessary changes (#1709)

This commit is contained in:
Subhrodip Mohanta 2021-05-01 23:52:35 +05:30 committed by GitHub
parent 41b1462eed
commit 31890f67e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 15 deletions

View File

@ -40,26 +40,26 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@master
uses: actions/checkout@v2
with:
# Disabling shallow clone for improving relevancy of SonarQube reporting
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@master
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
- name: Cache SonarCloud packages
uses: actions/cache@master
uses: actions/cache@v2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven dependencies
uses: actions/cache@master
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

View File

@ -38,16 +38,16 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@master
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@master
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
- name: Cache Maven Dependecies
uses: actions/cache@master
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

View File

@ -131,9 +131,10 @@ public class App {
* log requests.
*/
reactor
.registerChannel(tcpChannel(6666, loggingHandler))
.registerChannel(tcpChannel(6667, loggingHandler))
.registerChannel(udpChannel(6668, loggingHandler))
.registerChannel(tcpChannel(16666, loggingHandler))
.registerChannel(tcpChannel(16667, loggingHandler))
.registerChannel(udpChannel(16668, loggingHandler))
.registerChannel(udpChannel(16669, loggingHandler))
.start();
}

View File

@ -63,10 +63,10 @@ public class AppClient {
*/
public void start() throws IOException {
LOGGER.info("Starting logging clients");
service.execute(new TcpLoggingClient("Client 1", 6666));
service.execute(new TcpLoggingClient("Client 2", 6667));
service.execute(new UdpLoggingClient("Client 3", 6668));
service.execute(new UdpLoggingClient("Client 4", 6668));
service.execute(new TcpLoggingClient("Client 1", 16666));
service.execute(new TcpLoggingClient("Client 2", 16667));
service.execute(new UdpLoggingClient("Client 3", 16668));
service.execute(new UdpLoggingClient("Client 4", 16669));
}
/**
@ -114,7 +114,7 @@ public class AppClient {
@Override
public void run() {
try (Socket socket = new Socket(InetAddress.getLocalHost(), serverPort)) {
try (var socket = new Socket(InetAddress.getLocalHost(), serverPort)) {
var outputStream = socket.getOutputStream();
var writer = new PrintWriter(outputStream);
sendLogRequests(writer, socket.getInputStream());