bayserver-core 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.BAYKIT +53 -0
- data/README.md +3 -0
- data/lib/baykit/bayserver/agent/non_blocking_handler.rb +7 -0
- data/lib/baykit/bayserver/docker/base/inbound_ship.rb +7 -6
- data/lib/baykit/bayserver/docker/warp/warp_ship.rb +7 -2
- data/lib/baykit/bayserver/tours/tour_res.rb +1 -1
- data/lib/baykit/bayserver/tours/tour_store.rb +1 -0
- data/lib/baykit/bayserver/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3384e309df7bc1a51935394fa90199ec3037f2a40978a6612e5c4a8ae826cdbf
|
4
|
+
data.tar.gz: 0dd2baf7f2cf5878eda0fcace793d50f3dce873962c983e3d49fe899542cf158
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a84b96eba136c9bf08ec77ced8300289967bbe4a55d0aa9bdf66a4ceaad72dc0e27409878b92faf9f594ea11ed48dcff58fbc669b38daad37ef163c6d7b7bae
|
7
|
+
data.tar.gz: 64f1d19b52431b7f0986be35723231ea56ed17941314ce44ecab9d4a26296dc89e60f7a179f1eb71a4e5e3719de7d6630ac38a01f97a63ec20b2655707fba5f2
|
data/LICENSE.BAYKIT
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
/*
|
2
|
+
* The Baykit Public License, Version 1.1
|
3
|
+
*
|
4
|
+
* Copyright (c) 2000 The Yokohama Baykit. All rights reserved.
|
5
|
+
*
|
6
|
+
* This license is based on the Apache Software License 1.1
|
7
|
+
* (http://xml.apache.org/LICENSE)
|
8
|
+
*
|
9
|
+
* Redistribution and use in source and binary forms, with or without
|
10
|
+
* modification, are permitted provided that the following conditions
|
11
|
+
* are met:
|
12
|
+
*
|
13
|
+
* 1. Redistributions of source code must retain the above copyright
|
14
|
+
* notice, this list of conditions and the following disclaimer.
|
15
|
+
*
|
16
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
17
|
+
* notice, this list of conditions and the following disclaimer in
|
18
|
+
* the documentation and/or other materials provided with the
|
19
|
+
* distribution.
|
20
|
+
*
|
21
|
+
* 3. The end-user documentation included with the redistribution,
|
22
|
+
* if any, must include the following acknowledgment:
|
23
|
+
* "This product includes software developed by the
|
24
|
+
* Yokohama Baykit (http://www.baykit.org/)."
|
25
|
+
* Alternately, this acknowledgment may appear in the software itself,
|
26
|
+
* if and wherever such third-party acknowledgments normally appear.
|
27
|
+
*
|
28
|
+
* 4. The name "Baykit" must
|
29
|
+
* not be used to endorse or promote products derived from this
|
30
|
+
* software without prior written permission. For written
|
31
|
+
* permission, please contact xml@baykit.org.
|
32
|
+
*
|
33
|
+
* 5. Products derived from this software may not be called "Baykit",
|
34
|
+
* nor may "Baykit" appear in their name, without prior written
|
35
|
+
* permission of the Yokohama Baykit.
|
36
|
+
*
|
37
|
+
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
38
|
+
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
39
|
+
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
40
|
+
* DISCLAIMED. IN NO EVENT SHALL THE BAYKIT OR
|
41
|
+
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
42
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
43
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
44
|
+
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
45
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
46
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
47
|
+
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
48
|
+
* SUCH DAMAGE.
|
49
|
+
* ====================================================================
|
50
|
+
*
|
51
|
+
* For more information on the Yokohama Baykit, please see
|
52
|
+
* <http://www.baykit.org/>.
|
53
|
+
*/
|
data/README.md
ADDED
@@ -10,6 +10,7 @@ module Baykit
|
|
10
10
|
|
11
11
|
include Baykit::BayServer::Agent
|
12
12
|
include Baykit::BayServer::Tours
|
13
|
+
include Baykit::BayServer::WaterCraft
|
13
14
|
include Baykit::BayServer::Util
|
14
15
|
|
15
16
|
# class variables
|
@@ -165,7 +166,7 @@ module Baykit
|
|
165
166
|
if tur.zombie? || tur.aborted?
|
166
167
|
# Don't send peer any data
|
167
168
|
BayLog::debug("%s Aborted or zombie tour. do nothing: %s state=%s", self, tur, tur.state)
|
168
|
-
tur.change_state(
|
169
|
+
tur.change_state(Tour::TOUR_ID_NOCHECK, TourState::ENDED)
|
169
170
|
if callback != nil
|
170
171
|
callback.call()
|
171
172
|
end
|
@@ -174,8 +175,8 @@ module Baykit
|
|
174
175
|
|
175
176
|
max_len = @protocol_handler.max_res_packet_data_size();
|
176
177
|
if len > max_len
|
177
|
-
send_res_content(
|
178
|
-
send_res_content(
|
178
|
+
send_res_content(Ship::SHIP_ID_NOCHECK, tur, bytes, ofs, max_len)
|
179
|
+
send_res_content(Ship::SHIP_ID_NOCHECK, tur, bytes, ofs + max_len, len - max_len, &callback)
|
179
180
|
else
|
180
181
|
begin
|
181
182
|
@protocol_handler.send_res_content(tur, bytes, ofs, len, &callback)
|
@@ -187,7 +188,7 @@ module Baykit
|
|
187
188
|
end
|
188
189
|
end
|
189
190
|
|
190
|
-
def send_end_tour(chk_ship_id,
|
191
|
+
def send_end_tour(chk_ship_id, tur, &callback)
|
191
192
|
@lock.synchronize do
|
192
193
|
check_ship_id(chk_ship_id)
|
193
194
|
BayLog.debug("%s sendEndTour: %s state=%s", self, tur, tur.state)
|
@@ -195,7 +196,7 @@ module Baykit
|
|
195
196
|
if tur.zombie? || tur.aborted?
|
196
197
|
# Don't send peer any data. Do nothing
|
197
198
|
BayLog.debug("%s Aborted or zombie tour. do nothing: %s state=%s", self, tur, tur.state)
|
198
|
-
tur.change_state(
|
199
|
+
tur.change_state(Tour::TOUR_ID_NOCHECK, Tour::TourState::ENDED)
|
199
200
|
callback.call()
|
200
201
|
else
|
201
202
|
if !tur.valid?
|
@@ -216,7 +217,7 @@ module Baykit
|
|
216
217
|
end
|
217
218
|
end
|
218
219
|
|
219
|
-
tur.change_state(
|
220
|
+
tur.change_state(Tour::TOUR_ID_NOCHECK, Tour::TourState::ENDED)
|
220
221
|
|
221
222
|
@protocol_handler.send_end_tour(tur, keep_alive, &callback)
|
222
223
|
end
|
@@ -83,8 +83,13 @@ module Baykit
|
|
83
83
|
|
84
84
|
def end_warp_tour(tur)
|
85
85
|
wdat = WarpData.get(tur)
|
86
|
-
BayLog.debug("%s end: started=%s ended=%s", tur, wdat.started, wdat.ended)
|
87
|
-
|
86
|
+
BayLog.debug("%s end warp tour: started=%s ended=%s", tur, wdat.started, wdat.ended)
|
87
|
+
|
88
|
+
if(!@tour_map.include?(wdat.warp_id))
|
89
|
+
raise Sink.new("%s WarpId not in tourMap: %d", tur, wdat.warp_id);
|
90
|
+
else
|
91
|
+
@tour_map.delete wdat.warp_id
|
92
|
+
end
|
88
93
|
@docker.keep_ship(self)
|
89
94
|
end
|
90
95
|
|
metadata
CHANGED
@@ -1,21 +1,25 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bayserver-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michisuke-P
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: BayServer
|
13
|
+
description: BayServer is one of the high-speed web servers. It operates as a single-threaded,
|
14
|
+
asynchronous server, which makes it exceptionally fast. It also supports multi-core
|
15
|
+
processors, harnessing the full potential of the CPU's capabilities.
|
14
16
|
email: michisukep@gmail.com
|
15
17
|
executables: []
|
16
18
|
extensions: []
|
17
19
|
extra_rdoc_files: []
|
18
20
|
files:
|
21
|
+
- LICENSE.BAYKIT
|
22
|
+
- README.md
|
19
23
|
- lib/baykit/bayserver/agent/accept_handler.rb
|
20
24
|
- lib/baykit/bayserver/agent/channel_listener.rb
|
21
25
|
- lib/baykit/bayserver/agent/command_receiver.rb
|