Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
add67496
Commit
add67496
authored
Mar 17, 2013
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change address
parent
baa7c338
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/window_lobbybuttons.rb
lib/window_lobbybuttons.rb
+1
-1
lib/ygocore/game.rb
lib/ygocore/game.rb
+1
-1
No files found.
lib/window_lobbybuttons.rb
View file @
add67496
...
...
@@ -53,7 +53,7 @@ class Window_LobbyButtons < Window_List
require
'open-uri'
Thread
.
new
{
begin
open
(
'http://my
card-server.my-card.in:9997/match.json
'
)
{
|
f
|
open
(
'http://my
-card.in/match
'
)
{
|
f
|
@waiting
=
false
if
f
.
read
=~
/^mycard:\/\/([\d\.]+):(\d+)\/(.*)$/
room
=
Room
.
new
(
nil
,
$3
.
to_s
)
...
...
lib/ygocore/game.rb
View file @
add67496
...
...
@@ -94,7 +94,7 @@ class Ygocore < Game
end
#EventMachine::connect "mycard-server.my-card.in", 9997, Client
ws
=
WebSocket
::
EventMachine
::
Client
.
connect
(
:
host
=>
"mycard-server.my-card.in"
,
:port
=>
9998
);
ws
=
WebSocket
::
EventMachine
::
Client
.
connect
(
:
uri
=>
'ws://my-card.in/rooms.json'
);
ws
.
onmessage
do
|
msg
,
type
|
$log
.
info
(
'收到websocket消息'
)
{
msg
.
force_encoding
(
"UTF-8"
)
}
Game_Event
.
push
Game_Event
::
RoomsUpdate
.
new
JSON
.
parse
(
msg
).
collect
{
|
room
|
Game_Event
.
parse_room
(
room
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment