bayserver-core 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb17be48486a6dab58c78ec9c0bc0a61becb7244eb81bcada99325f455dbc1d1
4
- data.tar.gz: 51e0d53856a5b4b031a99ef7e4b7b3491478fc9bcddf9faa6302f9cfebd7e368
3
+ metadata.gz: 3384e309df7bc1a51935394fa90199ec3037f2a40978a6612e5c4a8ae826cdbf
4
+ data.tar.gz: 0dd2baf7f2cf5878eda0fcace793d50f3dce873962c983e3d49fe899542cf158
5
5
  SHA512:
6
- metadata.gz: 7ddc27addfc8ad480756621204165b499f0c821029ec9c7b43b74e5571451c948b5e97dd3b01c4992533c20a4d34447bfa23f0c15007e9038b596bd9ad134f61
7
- data.tar.gz: af83d798092c2def618208cfa5f42a5e0d395ffba6e4c13e28c410034c0a52a17b03b3c6002ddd528c61497efc8a3e537ea2da08e223a9e03dd0ddc2610a2b5e
6
+ metadata.gz: 3a84b96eba136c9bf08ec77ced8300289967bbe4a55d0aa9bdf66a4ceaad72dc0e27409878b92faf9f594ea11ed48dcff58fbc669b38daad37ef163c6d7b7bae
7
+ data.tar.gz: 64f1d19b52431b7f0986be35723231ea56ed17941314ce44ecab9d4a26296dc89e60f7a179f1eb71a4e5e3719de7d6630ac38a01f97a63ec20b2655707fba5f2
data/README.md CHANGED
@@ -1,2 +1,3 @@
1
- BayServer for Ruby
2
- https://baykit.yokohama/about-bayserver/
1
+ BayServer is one of the high-speed web servers. It operates as a single-threaded, asynchronous server, which makes it exceptionally fast. It also supports multi-core processors, harnessing the full potential of the CPU's capabilities.
2
+
3
+ https://baykit.yokohama
@@ -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(check_id, TourState::ENDED)
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(Tour::TOUR_ID_NOCHECK, tur, bytes, ofs, max_len)
178
- send_res_content(Tour::TOUR_ID_NOCHECK, tur, bytes, ofs + max_len, len - max_len, &callback)
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, chk_tour_id, tur, &callback)
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(chk_tour_id, Tour::TourState::ENDED)
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(chk_tour_id, Tour::TourState::ENDED)
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
- @tour_map.delete wdat.warp_id
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
 
@@ -225,7 +225,7 @@ module Baykit
225
225
  end
226
226
 
227
227
  begin
228
- @tour.ship.send_end_tour(@tour.ship_id, chk_tour_id, @tour, &done_lis)
228
+ @tour.ship.send_end_tour(@tour.ship_id, @tour, &done_lis)
229
229
  rescue IOError => e
230
230
  done_lis.call()
231
231
  raise e
@@ -65,6 +65,7 @@ module Baykit
65
65
  tur = @free_tours.delete_at(@free_tours.length - 1)
66
66
  else
67
67
  if !force && (@active_tour_map.length >= TourStore.max_count)
68
+ BayLog.warn("Max tour count reached")
68
69
  return nil
69
70
  else
70
71
  tur = Tour.new()
@@ -1,7 +1,7 @@
1
1
  module Baykit
2
2
  module BayServer
3
3
  class Version
4
- VERSION='2.2.1'
4
+ VERSION='2.2.2'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,16 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bayserver-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
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-08-30 00:00:00.000000000 Z
11
+ date: 2023-09-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: BayServer core module
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: []