Skip to content

Commit

Permalink
サーバー側のパッケージ名など変更
Browse files Browse the repository at this point in the history
  • Loading branch information
onozaty committed Jan 21, 2018
1 parent 3659a59 commit 289272d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 26 deletions.
18 changes: 0 additions & 18 deletions shared-camera-server/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
/*
* This settings file was auto generated by the Gradle buildInit task
* by 'onozato' at '18/01/14 0:04' with Gradle 2.14.1
*
* The settings file is used to specify which projects to include in your build.
* In a single project build this file can be empty or even removed.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user guide at https://docs.gradle.org/2.14.1/userguide/multi_project_builds.html
*/

/*
// To declare projects as part of a multi-project build use the 'include' method
include 'shared'
include 'api'
include 'services:webservice'
*/

rootProject.name = 'shared-camera-server'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.enjoyxstudy.sharedcamera;
package com.enjoyxstudy.sharedcamera.server;

import java.io.IOException;
import java.nio.ByteBuffer;
Expand All @@ -15,7 +15,7 @@

@Component
@Slf4j
public class BinaryHandler extends BinaryWebSocketHandler {
public class ImageWebSocketHandler extends BinaryWebSocketHandler {

private CopyOnWriteArrayList<WebSocketSession> sessions = new CopyOnWriteArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.enjoyxstudy.sharedcamera;
package com.enjoyxstudy.sharedcamera.server;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.enjoyxstudy.sharedcamera;
package com.enjoyxstudy.sharedcamera.server;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
Expand All @@ -12,10 +12,10 @@
@AllArgsConstructor
public class WebSocketConfig implements WebSocketConfigurer {

private final BinaryHandler binaryHandler;
private final ImageWebSocketHandler imageWebSocketHandler;

@Override
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
registry.addHandler(binaryHandler, "/endpoint");
registry.addHandler(imageWebSocketHandler, "/endpoint");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
spring.mvc.favicon.enabled=false
4 changes: 2 additions & 2 deletions shared-camera-server/src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2>Shared Camera (with WebSocket)</h2>
Transmission interval(ms)
<select id="intervalSelect" class="form-control input-sm">
<option value="50">50</option>
<option value="100">100</option>
<option value="100" selected>100</option>
<option value="200">200</option>
<option value="500">500</option>
<option value="1000">1,000</option>
Expand Down Expand Up @@ -65,7 +65,7 @@ <h2>Shared Camera (with WebSocket)</h2>
<script>
$(function() {
const URL = window.URL || window.webkitURL;
const endpoint = 'ws://' + location.host + '/endpoint?' + window.location.hash;
const endpoint = 'ws://' + location.host + '/endpoint';

const $status = $('#status').text('Idle');

Expand Down

0 comments on commit 289272d

Please sign in to comment.