Commit 85a01308 authored by 神楽坂玲奈's avatar 神楽坂玲奈

class Room

parent 06e55585
{
"name": "ygopro-server",
"version": "2.0.0",
"description": "a server for ygopro",
"repository": {
"type": "git",
"url": "https://github.com/mycard/ygopro-server.git"
},
"keywords": [
"mycard",
"ygopro",
"server"
],
"author": "zh99998 <zh99998@gmail.com>",
"dependencies": {
"underscore": "*",
"freeport": "*",
"struct": "*",
"inotify": "*"
},
"license": "GPLv3",
"main": "ygopro-server.js",
"scripts": {
"start": "forever start mycard-server-match.js",
"build": "coffee -c mycard-server-match.coffee"
},
"engines": {
"node": "*"
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
net = require 'net'
http = require 'http'
url = require 'url'
spawn = require('child_process').spawn
freeport = require 'freeport'
Struct = require('struct').Struct
_ = require 'underscore'
structs_declaration = require './structs.json' #结构体声明
typedefs = require './typedefs.json' #类型声明
proto_structs = require './proto_structs.json' #消息与结构体的对应,未完成,对着duelclient.cpp加
constants = require './constants.json' #network.h里定义的常量
settings = require './config.json' #本机IP端口设置
if process.argv[2] == '--debug'
settings.port++
settings.http_port++
#结构体定义
structs = {}
for name, declaration of structs_declaration
result = Struct()
for field in declaration
if field.encoding
switch field.encoding
when "UTF-16LE" then result.chars field.name, field.length*2, field.encoding
else throw "unsupported encoding: #{file.encoding}"
else
type = field.type
type = typedefs[type] if typedefs[type]
if field.length
result.array field.name, field.length, type #不支持结构体
else
if structs[type]
result.struct field.name, structs[type]
else
result[type] field.name
structs[name] = result
stoc_follows = {}
ctos_follows = {}
stoc_follow = (proto, synchronous, callback)->
if typeof proto == 'string'
for key, value of constants.STOC
if value == proto
proto = key
break
throw "unknown proto" if !constants.STOC[proto]
stoc_follows[proto] = {callback: callback, synchronous: synchronous}
ctos_follow = (proto, synchronous, callback)->
if typeof proto == 'string'
for key, value of constants.CTOS
if value == proto
proto = key
break
throw "unknown proto" if !constants.CTOS[proto]
ctos_follows[proto] = {callback: callback, synchronous: synchronous}
stoc_send = (socket, proto, info)->
#console.log proto, proto_structs.STOC[proto], structs[proto_structs.STOC[proto]]
if typeof info == 'undefined'
buffer = ""
else if Buffer.isBuffer(info)
buffer = info
else
struct = structs[proto_structs.STOC[proto]]
struct.allocate()
struct.set info
buffer = struct.buffer()
if typeof proto == 'string' #需要重构
for key, value of constants.STOC
if value == proto
proto = key
break
throw "unknown proto" if !constants.STOC[proto]
header = new Buffer(3)
header.writeUInt16LE buffer.length + 1, 0
header.writeUInt8 proto, 2
socket.write header
socket.write buffer if buffer.length
console.log 'stoc_sent:', buffer
ctos_send = (socket, proto, info)->
#console.log proto, proto_structs.CTOS[proto], structs[proto_structs.CTOS[proto]]
if typeof info == 'undefined'
buffer = ""
else if Buffer.isBuffer(info)
buffer = info
else
struct = structs[proto_structs.CTOS[proto]]
struct.allocate()
struct.set info
buffer = struct.buffer()
if typeof proto == 'string' #需要重构
for key, value of constants.CTOS
if value == proto
proto = key
break
throw "unknown proto" if !constants.CTOS[proto]
header = new Buffer(3)
header.writeUInt16LE buffer.length + 1, 0
header.writeUInt8 proto, 2
socket.write header
socket.write buffer if buffer.length
console.log 'ctos_sent:', buffer
server_listener = (port, client, server)->
client.connected = true
console.log "connected #{port}"
stoc_buffer = new Buffer(0)
stoc_message_length = 0
stoc_proto = 0
for buffer in client.pre_connecion_buffers
server.write buffer
server.on "data", (data) ->
console.log 'server: ', data
stoc_buffer = Buffer.concat([stoc_buffer, data], stoc_buffer.length + data.length)
#buffer的错误使用方式,好孩子不要学
while true
if stoc_message_length == 0
if stoc_buffer.length >= 2
stoc_message_length = stoc_buffer.readUInt16LE(0)
else
break
else if stoc_proto == 0
if stoc_buffer.length >= 3
stoc_proto = stoc_buffer.readUInt8(2)
else
break
else
if stoc_buffer.length >= 2 + stoc_message_length
console.log constants.STOC[stoc_proto]
if stoc_follows[stoc_proto]
b = stoc_buffer.slice(3, stoc_message_length - 1 + 3)
if struct = structs[proto_structs.STOC[constants.STOC[stoc_proto]]]
struct._setBuff(b)
setTimeout stoc_follows[stoc_proto].callback, 0, b, struct.fields, client, server
else
setTimeout stoc_follows[stoc_proto].callback, 0, b, null, client, server
stoc_buffer = stoc_buffer.slice(2 + stoc_message_length)
stoc_message_length = 0
stoc_proto = 0
else
break
unless stoc_follows[stoc_proto] and stoc_follows[stoc_proto].synchronous
client.write data
server.on "error", (e) ->
console.log "server error #{e}"
client.end()
server.on "close", (had_error) ->
console.log "server closed #{had_error}"
client.end()
#main
rooms = {}
rooms_port_process = {}
#rooms_clients = {}
listener = net.createServer (client) ->
client.connected = false
ctos_buffer = new Buffer(0)
ctos_message_length = 0
ctos_proto = 0
client.pre_connecion_buffers = new Array()
server = new net.Socket()
server.on "error", (e) ->
console.log "server error #{e}"
client.on "data", (data) ->
console.log 'client: ', data
ctos_buffer = Buffer.concat([ctos_buffer, data], ctos_buffer.length + data.length) #buffer的错误使用方式,好孩子不要学
while true
if ctos_message_length == 0
if ctos_buffer.length >= 2
ctos_message_length = ctos_buffer.readUInt16LE(0)
else
break
else if ctos_proto == 0
if ctos_buffer.length >= 3
ctos_proto = ctos_buffer.readUInt8(2)
else
break
else
if ctos_buffer.length >= 2 + ctos_message_length
console.log constants.CTOS[ctos_proto]
if ctos_follows[ctos_proto]
b = ctos_buffer.slice(3, ctos_message_length-1+3)
if struct = structs[proto_structs.CTOS[constants.CTOS[ctos_proto]]]
struct._setBuff(b)
setTimeout ctos_follows[ctos_proto].callback, 0, b, struct.fields, client, server
else
setTimeout ctos_follows[ctos_proto].callback, 0, b, null, client, server
ctos_buffer = ctos_buffer.slice(2 + ctos_message_length)
ctos_message_length = 0
ctos_proto = 0
else
break
unless ctos_follows[ctos_proto] and ctos_follows[ctos_proto].synchronous
if client.connected
server.write data
else
client.pre_connecion_buffers.push data
client.on "error", (e) ->
console.log "client error #{e}"
server.end()
client.on "close", (had_error) ->
console.log "client closed #{had_error}"
server.end()
.listen settings.port, null, null, ->
console.log "server started on #{settings.ip}:#{settings.port}"
ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server)->
client.player = info.name
ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
room_name = info.pass
if info.version != settings.version
stoc_send client, 'ERROR_MSG',{
msg: 4
code: settings.version
}
client.end()
else if !room_name.length
stoc_send client, 'JOIN_GAME', {}
stoc_send client, 'HS_PLAYER_ENTER', {
name: '提示: 房间为空,请修改房间名'
pos: 0
}
else if room_name == '[INCORRECT]' #房间密码验证
stoc_send client, 'ERROR_MSG',{
msg: 1
code: 1 #这返错有问题,直接双ygopro直连怎么都正常,在服务器上就经常弹不出提示
}
client.end()
else
if client.player != '[INCORRECT]' #用户验证
if rooms[room_name]
if typeof rooms[room_name] == 'number' #already connected
#rooms_clients[room_name].push client
server.connect rooms[room_name], '127.0.0.1', ->
server_listener(rooms[room_name], client, server)
else
#rooms_clients[room_name].push client
rooms[room_name].push client
else
freeport (err, port)->
if rooms[room_name] #如果等freeport的时间差又来了个.....
if typeof rooms[room_name] == 'number' #already connected
#rooms_clients[room_name].push client
server.connect rooms[room_name], '127.0.0.1', ->
server_listener(rooms[room_name], client, server)
else
rooms[room_name].push client
else
if(err)
stoc_send client, 'ERROR_MSG',{
msg: 1
code: 2
}
client.end()
else
rooms[room_name] = [client]
if room_name[0...2] == 'M#'
param = [0, 0, 1, 'F', 'F', 'F', 8000, 5, 1]
else if room_name[0...2] == 'T#'
param = [0, 0, 2, 'F', 'F', 'F', 8000, 5, 1]
else if (param = room_name.match /^(\d)?(\d)(\d)(T|F)(T|F)(T|F)(\d+),(\d+),(\d+)/i)
param.shift()
param[0] == parseInt(param[0])
else
param = [0, 0, 0, 'F', 'F', 'F', 8000, 5, 1]
param.unshift port
room = spawn './ygopro', param, cwd: 'ygocore'
room.alive = true
rooms_port_process[port] = room
room.on 'exit', (code)->
delete rooms[room_name]
delete rooms_port_process[port]
room.stdout.once 'data', (data)->
if(rooms[room_name])
rooms[room_name].forEach (c)->
server.connect port, '127.0.0.1', ->
server_listener(port, c, server)
rooms[room_name] = port
else
room.kill()
else
stoc_send client, 'ERROR_MSG',{
msg: 1
code: 2
}
client.end()
######################################################################################################################
#欢迎信息
stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
stoc_send client, 'CHAT', {
player: 8
msg: "Mycard Debugging Server"
}
stoc_send client, 'CHAT', {
player: 8
msg: "这里是测试中的新服务器, 还不稳定, 随时可能崩溃, 遇到意外请淡定\n ˉˉˉˉˉ"
}
#登场台词
taici = require './taici.json'
stoc_follow 'GAME_MSG', false, (buffer, info, client, server)->
msg = buffer.readInt8(0)
if constants.MSG[msg] == 'SUMMONING' or constants.MSG[msg] == 'SPSUMMONING'
card = buffer.readUInt32LE(1)
if taici[card]
for line in taici[card][Math.floor(Math.random() * taici[card].length)].split("\n")
stoc_send client, 'CHAT', {
player: 8
msg: line
}
#stoc_follow 'HS_PLAYER_CHANGE', false, (buffer, info, client, server)->
# console.log 'HS_PLAYER_CHANGE', info
#stoc_follow 'CHAT', false, (buffer, info, client, server)->
# console.log info, buffer
#房间数量
http.createServer (request, response)->
if url.parse(request.url).pathname == '/count.json'
response.writeHead(200);
response.end(Object.keys(rooms).length.toString())
else
response.writeHead(404);
response.end();
.listen settings.http_port
#清理90s没活动的房间
path = require 'path'
fs = require 'fs'
Inotify = require('inotify').Inotify
inotify = new Inotify()
inotify.addWatch
path: 'ygocore/replay',
watch_for: Inotify.IN_CLOSE_WRITE | Inotify.IN_CREATE | Inotify.IN_MODIFY,
callback: (event)->
mask = event.mask
if event.name
port = parseInt path.basename(event.name, '.yrp')
room = rooms_port_process[port]
if room
if mask & Inotify.IN_CREATE
else if mask & Inotify.IN_CLOSE_WRITE
fs.unlink path.join('ygocore/replay'), (err)->
else if mask & Inotify.IN_MODIFY
room.alive = true
else
console.log '[warn] event without filename'
setInterval ()->
for port, room of rooms_port_process
if room.alive
room.alive = false
else
console.log "killed #{port} #{room}"
room.kill()
, 900000
#tip
###
request = require 'request'
request
url: 'https://forum.my-card.in/admin/site_contents/faq'
json: true
, (error, response, body)->
console.log body
stoc_follow 'DUEL_START', false, (buffer, info, client, server)->
stoc_send client, 'CHAT', {
player: 8
msg: "FAQ: 喵喵喵"
}
###
###
# 开包大战
packs_weighted_cards = {}
for pack, cards of require './packs.json'
packs_weighted_cards[pack] = []
for card in cards
for i in [0..card.count]
packs_weighted_cards[pack].push card.card
console.log packs_weighted_cards
ctos_follow 'UPDATE_DECK', false, (buffer, info, client, server)->
ctos_send server, 'HS_NOTREADY'
deck = []
for pack in client.player
for i in [0...5]
deck.push packs_weighted_cards[pack][Math.floor(Math.random()*packs_weighted_cards[pack].length)]
ctos_send server, 'UPDATE_DECK', {
mainc: deck.length,
sidec: 0,
deckbuf: deck
}
ctos_send server, 'HS_READY'
###
#官方库
net = require 'net'
http = require 'http'
url = require 'url'
path = require 'path'
fs = require 'fs'
spawn = require('child_process').spawn
#三方库
freeport = require 'freeport'
Struct = require('struct').Struct
_ = require 'underscore'
Inotify = require('inotify').Inotify
#常量/类型声明
structs_declaration = require './structs.json' #结构体声明
typedefs = require './typedefs.json' #类型声明
proto_structs = require './proto_structs.json' #消息与结构体的对应,未完成,对着duelclient.cpp加
constants = require './constants.json' #network.h里定义的常量
#配置文件
settings = require './config.json' #本机IP端口设置
class Room
@all = []
#name
#port
#players: [{client, server, name, pos}]
#process
#established
#alive
constructor: (name, port, client) ->
@name = name
@port = port
@alive = true
@players = []
@add_client(client)
Room.all.push this #这个故事告诉我们没事不要乱new Room
delete: (room)->
delete Room.all[_.indexOf(Room.all, room)]
add_client: (client)->
@players.push {client: client, name: client.player}
#需要性能优化,建立个索引
@find_by_name: (name)->
_.find @all, (room)->
room.name == name
@find_by_port: (port)->
_.find @all, (room)->
room.name == port
@find_by_client: (client)->
_.find @all, (room)->
_.some room.players, (player)->
player.client == client
#debug模式 端口号+1
debug = false
if process.argv[2] == '--debug'
settings.port++
settings.http_port++
debug = true
#结构体定义
structs = {}
for name, declaration of structs_declaration
result = Struct()
for field in declaration
if field.encoding
switch field.encoding
when "UTF-16LE" then result.chars field.name, field.length*2, field.encoding
else throw "unsupported encoding: #{file.encoding}"
else
type = field.type
type = typedefs[type] if typedefs[type]
if field.length
result.array field.name, field.length, type #不支持结构体
else
if structs[type]
result.struct field.name, structs[type]
else
result[type] field.name
structs[name] = result
#消息跟踪函数 需要重构, 另暂时只支持异步, 同步没做.
stoc_follows = {}
ctos_follows = {}
stoc_follow = (proto, synchronous, callback)->
if typeof proto == 'string'
for key, value of constants.STOC
if value == proto
proto = key
break
throw "unknown proto" if !constants.STOC[proto]
stoc_follows[proto] = {callback: callback, synchronous: synchronous}
ctos_follow = (proto, synchronous, callback)->
if typeof proto == 'string'
for key, value of constants.CTOS
if value == proto
proto = key
break
throw "unknown proto" if !constants.CTOS[proto]
ctos_follows[proto] = {callback: callback, synchronous: synchronous}
#消息发送函数,至少要把俩合起来....
stoc_send = (socket, proto, info)->
#console.log proto, proto_structs.STOC[proto], structs[proto_structs.STOC[proto]]
if typeof info == 'undefined'
buffer = ""
else if Buffer.isBuffer(info)
buffer = info
else
struct = structs[proto_structs.STOC[proto]]
struct.allocate()
struct.set info
buffer = struct.buffer()
if typeof proto == 'string' #需要重构
for key, value of constants.STOC
if value == proto
proto = key
break
throw "unknown proto" if !constants.STOC[proto]
header = new Buffer(3)
header.writeUInt16LE buffer.length + 1, 0
header.writeUInt8 proto, 2
socket.write header
socket.write buffer if buffer.length
console.log 'stoc_sent:', buffer if debug
ctos_send = (socket, proto, info)->
#console.log proto, proto_structs.CTOS[proto], structs[proto_structs.CTOS[proto]]
if typeof info == 'undefined'
buffer = ""
else if Buffer.isBuffer(info)
buffer = info
else
struct = structs[proto_structs.CTOS[proto]]
struct.allocate()
struct.set info
buffer = struct.buffer()
if typeof proto == 'string' #需要重构
for key, value of constants.CTOS
if value == proto
proto = key
break
throw "unknown proto" if !constants.CTOS[proto]
header = new Buffer(3)
header.writeUInt16LE buffer.length + 1, 0
header.writeUInt8 proto, 2
socket.write header
socket.write buffer if buffer.length
console.log 'ctos_sent:', buffer if debug
#服务器端消息监听函数
server_listener = (port, client, server)->
client.connected = true
console.log "connected #{port}"
stoc_buffer = new Buffer(0)
stoc_message_length = 0
stoc_proto = 0
for buffer in client.pre_connecion_buffers
server.write buffer
server.on "data", (data) ->
console.log 'server: ', data if debug
stoc_buffer = Buffer.concat([stoc_buffer, data], stoc_buffer.length + data.length)
#buffer的错误使用方式,好孩子不要学
while true
if stoc_message_length == 0
if stoc_buffer.length >= 2
stoc_message_length = stoc_buffer.readUInt16LE(0)
else
break
else if stoc_proto == 0
if stoc_buffer.length >= 3
stoc_proto = stoc_buffer.readUInt8(2)
else
break
else
if stoc_buffer.length >= 2 + stoc_message_length
console.log constants.STOC[stoc_proto] if debug
if stoc_follows[stoc_proto]
b = stoc_buffer.slice(3, stoc_message_length - 1 + 3)
if struct = structs[proto_structs.STOC[constants.STOC[stoc_proto]]]
struct._setBuff(b)
setTimeout stoc_follows[stoc_proto].callback, 0, b, struct.fields, client, server
else
setTimeout stoc_follows[stoc_proto].callback, 0, b, null, client, server
stoc_buffer = stoc_buffer.slice(2 + stoc_message_length)
stoc_message_length = 0
stoc_proto = 0
else
break
unless stoc_follows[stoc_proto] and stoc_follows[stoc_proto].synchronous
client.write data
server.on "error", (e) ->
console.log "server error #{e}"
client.end()
server.on "close", (had_error) ->
console.log "server closed #{had_error}"
client.end()
#main
listener = net.createServer (client) ->
client.connected = false
ctos_buffer = new Buffer(0)
ctos_message_length = 0
ctos_proto = 0
client.pre_connecion_buffers = new Array()
server = new net.Socket()
server.on "error", (e) ->
console.log "server error #{e}"
client.on "data", (data) ->
console.log 'client: ', data if debug
ctos_buffer = Buffer.concat([ctos_buffer, data], ctos_buffer.length + data.length) #buffer的错误使用方式,好孩子不要学
while true
if ctos_message_length == 0
if ctos_buffer.length >= 2
ctos_message_length = ctos_buffer.readUInt16LE(0)
else
break
else if ctos_proto == 0
if ctos_buffer.length >= 3
ctos_proto = ctos_buffer.readUInt8(2)
else
break
else
if ctos_buffer.length >= 2 + ctos_message_length
console.log constants.CTOS[ctos_proto] if debug
if ctos_follows[ctos_proto]
b = ctos_buffer.slice(3, ctos_message_length-1+3)
if struct = structs[proto_structs.CTOS[constants.CTOS[ctos_proto]]]
struct._setBuff(b)
setTimeout ctos_follows[ctos_proto].callback, 0, b, struct.fields, client, server
else
setTimeout ctos_follows[ctos_proto].callback, 0, b, null, client, server
ctos_buffer = ctos_buffer.slice(2 + ctos_message_length)
ctos_message_length = 0
ctos_proto = 0
else
break
unless ctos_follows[ctos_proto] and ctos_follows[ctos_proto].synchronous
if client.connected
server.write data
else
client.pre_connecion_buffers.push data
client.on "error", (e) ->
console.log "client error #{e}"
server.end()
client.on "close", (had_error) ->
console.log "client closed #{had_error}"
server.end()
.listen settings.port, null, null, ->
console.log "server started on #{settings.ip}:#{settings.port}"
ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server)->
client.player = info.name
ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
room_name = info.pass
if info.version != settings.version
stoc_send client, 'ERROR_MSG',{
msg: 4
code: settings.version
}
client.end()
else if !room_name.length
stoc_send client, 'JOIN_GAME', {}
stoc_send client, 'HS_PLAYER_ENTER', {
name: '提示: 房间为空,请修改房间名'
pos: 0
}
else if room_name == '[INCORRECT]' #房间密码验证
stoc_send client, 'ERROR_MSG',{
msg: 1
code: 1 #这返错有问题,直接双ygopro直连怎么都正常,在服务器上就经常弹不出提示
}
client.end()
else
if client.player != '[INCORRECT]' #用户验证
room = Room.find_by_name(room_name)
if room
room.add_client client
if room.established
server.connect room.port, '127.0.0.1', ->
server_listener(room.port, client, server)
else
freeport (err, port)->
room = Room.find_by_name(room_name)
if room #如果等freeport的时间差又来了个.....
room.add_client client
if room.established
server.connect room.port, '127.0.0.1', ->
server_listener(room.port, client, server)
else
if(err)
stoc_send client, 'ERROR_MSG',{
msg: 1
code: 2
}
client.end()
else
room = new Room(room_name, port, client)
if room_name[0...2] == 'M#'
param = [0, 0, 1, 'F', 'F', 'F', 8000, 5, 1]
else if room_name[0...2] == 'T#'
param = [0, 0, 2, 'F', 'F', 'F', 8000, 5, 1]
else if (param = room_name.match /^(\d)?(\d)(\d)(T|F)(T|F)(T|F)(\d+),(\d+),(\d+)/i)
param.shift()
param[0] == parseInt(param[0])
else
param = [0, 0, 0, 'F', 'F', 'F', 8000, 5, 1]
param.unshift port
process = spawn './ygopro', param, cwd: 'ygocore'
room.process = process
process.on 'exit', (code)->
room.delete()
process.stdout.once 'data', (data)->
room.established = true
_.each room.players, (player)->
server.connect port, '127.0.0.1', ->
server_listener(port, player.client, server)
else
stoc_send client, 'ERROR_MSG',{
msg: 1
code: 2
}
client.end()
######################################################################################################################
#欢迎信息
stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
stoc_send client, 'CHAT', {
player: 8
msg: "Mycard Debugging Server"
}
stoc_send client, 'CHAT', {
player: 8
msg: "这里是测试中的新服务器, 还不稳定, 随时可能崩溃, 遇到意外请淡定\n ˉˉˉˉˉ"
}
#登场台词
taici = require './taici.json'
stoc_follow 'GAME_MSG', false, (buffer, info, client, server)->
msg = buffer.readInt8(0)
if constants.MSG[msg] == 'SUMMONING' or constants.MSG[msg] == 'SPSUMMONING'
card = buffer.readUInt32LE(1)
if taici[card]
for line in taici[card][Math.floor(Math.random() * taici[card].length)].split("\n")
stoc_send client, 'CHAT', {
player: 8
msg: line
}
#stoc_follow 'HS_PLAYER_CHANGE', false, (buffer, info, client, server)->
# console.log 'HS_PLAYER_CHANGE', info
#stoc_follow 'CHAT', false, (buffer, info, client, server)->
# console.log info, buffer
#房间数量
http.createServer (request, response)->
if url.parse(request.url).pathname == '/count.json'
response.writeHead(200);
response.end(rooms.length.toString())
else
response.writeHead(404);
response.end();
.listen settings.http_port
#清理90s没活动的房间
inotify = new Inotify()
inotify.addWatch
path: 'ygocore/replay',
watch_for: Inotify.IN_CLOSE_WRITE | Inotify.IN_CREATE | Inotify.IN_MODIFY,
callback: (event)->
mask = event.mask
if event.name
port = parseInt path.basename(event.name, '.yrp')
room = Room.find_by_port port
if room
if mask & Inotify.IN_CREATE
else if mask & Inotify.IN_CLOSE_WRITE
fs.unlink path.join('ygocore/replay'), (err)->
else if mask & Inotify.IN_MODIFY
room.alive = true
else
console.log '[warn] event without filename'
setInterval ()->
for room in rooms
if room.alive
room.alive = false
else
console.log "kill #{port} #{room}"
room.process.kill()
, 900000
#tip
###
request = require 'request'
request
url: 'https://forum.my-card.in/admin/site_contents/faq'
json: true
, (error, response, body)->
console.log body
stoc_follow 'DUEL_START', false, (buffer, info, client, server)->
stoc_send client, 'CHAT', {
player: 8
msg: "FAQ: 喵喵喵"
}
###
###
# 开包大战
packs_weighted_cards = {}
for pack, cards of require './packs.json'
packs_weighted_cards[pack] = []
for card in cards
for i in [0..card.count]
packs_weighted_cards[pack].push card.card
console.log packs_weighted_cards
ctos_follow 'UPDATE_DECK', false, (buffer, info, client, server)->
ctos_send server, 'HS_NOTREADY'
deck = []
for pack in client.player
for i in [0...5]
deck.push packs_weighted_cards[pack][Math.floor(Math.random()*packs_weighted_cards[pack].length)]
ctos_send server, 'UPDATE_DECK', {
mainc: deck.length,
sidec: 0,
deckbuf: deck
}
ctos_send server, 'HS_READY'
###
// Generated by CoffeeScript 1.6.3
(function() {
var Inotify, Struct, constants, ctos_follow, ctos_follows, ctos_send, declaration, field, freeport, fs, http, inotify, listener, name, net, path, proto_structs, result, rooms, rooms_port_process, server_listener, settings, spawn, stoc_follow, stoc_follows, stoc_send, structs, structs_declaration, taici, type, typedefs, url, _, _i, _len;
var Inotify, Room, Struct, constants, ctos_follow, ctos_follows, ctos_send, debug, declaration, field, freeport, fs, http, inotify, listener, name, net, path, proto_structs, result, server_listener, settings, spawn, stoc_follow, stoc_follows, stoc_send, structs, structs_declaration, taici, type, typedefs, url, _, _i, _len;
net = require('net');
......@@ -8,6 +8,10 @@
url = require('url');
path = require('path');
fs = require('fs');
spawn = require('child_process').spawn;
freeport = require('freeport');
......@@ -16,6 +20,8 @@
_ = require('underscore');
Inotify = require('inotify').Inotify;
structs_declaration = require('./structs.json');
typedefs = require('./typedefs.json');
......@@ -26,9 +32,59 @@
settings = require('./config.json');
Room = (function() {
Room.all = [];
function Room(name, port, client) {
this.name = name;
this.port = port;
this.alive = true;
this.players = [];
this.add_client(client);
Room.all.push(this);
}
Room.prototype["delete"] = function(room) {
return delete Room.all[_.indexOf(Room.all, room)];
};
Room.prototype.add_client = function(client) {
return this.players.push({
client: client,
name: client.player
});
};
Room.find_by_name = function(name) {
return _.find(this.all, function(room) {
return room.name === name;
});
};
Room.find_by_port = function(port) {
return _.find(this.all, function(room) {
return room.name === port;
});
};
Room.find_by_client = function(client) {
return _.find(this.all, function(room) {
return _.some(room.players, function(player) {
return player.client === client;
});
});
};
return Room;
})();
debug = false;
if (process.argv[2] === '--debug') {
settings.port++;
settings.http_port++;
debug = true;
}
structs = {};
......@@ -143,7 +199,9 @@
if (buffer.length) {
socket.write(buffer);
}
return console.log('stoc_sent:', buffer);
if (debug) {
return console.log('stoc_sent:', buffer);
}
};
ctos_send = function(socket, proto, info) {
......@@ -178,7 +236,9 @@
if (buffer.length) {
socket.write(buffer);
}
return console.log('ctos_sent:', buffer);
if (debug) {
return console.log('ctos_sent:', buffer);
}
};
server_listener = function(port, client, server) {
......@@ -195,7 +255,9 @@
}
server.on("data", function(data) {
var b, struct;
console.log('server: ', data);
if (debug) {
console.log('server: ', data);
}
stoc_buffer = Buffer.concat([stoc_buffer, data], stoc_buffer.length + data.length);
while (true) {
if (stoc_message_length === 0) {
......@@ -212,7 +274,9 @@
}
} else {
if (stoc_buffer.length >= 2 + stoc_message_length) {
console.log(constants.STOC[stoc_proto]);
if (debug) {
console.log(constants.STOC[stoc_proto]);
}
if (stoc_follows[stoc_proto]) {
b = stoc_buffer.slice(3, stoc_message_length - 1 + 3);
if (struct = structs[proto_structs.STOC[constants.STOC[stoc_proto]]]) {
......@@ -244,10 +308,6 @@
});
};
rooms = {};
rooms_port_process = {};
listener = net.createServer(function(client) {
var ctos_buffer, ctos_message_length, ctos_proto, server;
client.connected = false;
......@@ -261,7 +321,9 @@
});
client.on("data", function(data) {
var b, struct;
console.log('client: ', data);
if (debug) {
console.log('client: ', data);
}
ctos_buffer = Buffer.concat([ctos_buffer, data], ctos_buffer.length + data.length);
while (true) {
if (ctos_message_length === 0) {
......@@ -278,7 +340,9 @@
}
} else {
if (ctos_buffer.length >= 2 + ctos_message_length) {
console.log(constants.CTOS[ctos_proto]);
if (debug) {
console.log(constants.CTOS[ctos_proto]);
}
if (ctos_follows[ctos_proto]) {
b = ctos_buffer.slice(3, ctos_message_length - 1 + 3);
if (struct = structs[proto_structs.CTOS[constants.CTOS[ctos_proto]]]) {
......@@ -321,7 +385,7 @@
});
ctos_follow('JOIN_GAME', false, function(buffer, info, client, server) {
var room_name;
var room, room_name;
room_name = info.pass;
if (info.version !== settings.version) {
stoc_send(client, 'ERROR_MSG', {
......@@ -343,24 +407,24 @@
return client.end();
} else {
if (client.player !== '[INCORRECT]') {
if (rooms[room_name]) {
if (typeof rooms[room_name] === 'number') {
return server.connect(rooms[room_name], '127.0.0.1', function() {
return server_listener(rooms[room_name], client, server);
room = Room.find_by_name(room_name);
if (room) {
room.add_client(client);
if (room.established) {
return server.connect(room.port, '127.0.0.1', function() {
return server_listener(room.port, client, server);
});
} else {
return rooms[room_name].push(client);
}
} else {
return freeport(function(err, port) {
var param, room;
if (rooms[room_name]) {
if (typeof rooms[room_name] === 'number') {
return server.connect(rooms[room_name], '127.0.0.1', function() {
return server_listener(rooms[room_name], client, server);
var param, process;
room = Room.find_by_name(room_name);
if (room) {
room.add_client(client);
if (room.established) {
return server.connect(room.port, '127.0.0.1', function() {
return server_listener(room.port, client, server);
});
} else {
return rooms[room_name].push(client);
}
} else {
if (err) {
......@@ -370,7 +434,7 @@
});
return client.end();
} else {
rooms[room_name] = [client];
room = new Room(room_name, port, client);
if (room_name.slice(0, 2) === 'M#') {
param = [0, 0, 1, 'F', 'F', 'F', 8000, 5, 1];
} else if (room_name.slice(0, 2) === 'T#') {
......@@ -382,26 +446,20 @@
param = [0, 0, 0, 'F', 'F', 'F', 8000, 5, 1];
}
param.unshift(port);
room = spawn('./ygopro', param, {
process = spawn('./ygopro', param, {
cwd: 'ygocore'
});
room.alive = true;
rooms_port_process[port] = room;
room.on('exit', function(code) {
delete rooms[room_name];
return delete rooms_port_process[port];
room.process = process;
process.on('exit', function(code) {
return room["delete"]();
});
return room.stdout.once('data', function(data) {
if (rooms[room_name]) {
rooms[room_name].forEach(function(c) {
return server.connect(port, '127.0.0.1', function() {
return server_listener(port, c, server);
});
return process.stdout.once('data', function(data) {
room.established = true;
return _.each(room.players, function(player) {
return server.connect(port, '127.0.0.1', function() {
return server_listener(port, player.client, server);
});
return rooms[room_name] = port;
} else {
return room.kill();
}
});
});
}
}
......@@ -453,19 +511,13 @@
http.createServer(function(request, response) {
if (url.parse(request.url).pathname === '/count.json') {
response.writeHead(200);
return response.end(Object.keys(rooms).length.toString());
return response.end(rooms.length.toString());
} else {
response.writeHead(404);
return response.end();
}
}).listen(settings.http_port);
path = require('path');
fs = require('fs');
Inotify = require('inotify').Inotify;
inotify = new Inotify();
inotify.addWatch({
......@@ -476,7 +528,7 @@
mask = event.mask;
if (event.name) {
port = parseInt(path.basename(event.name, '.yrp'));
room = rooms_port_process[port];
room = Room.find_by_port(port);
if (room) {
if (mask & Inotify.IN_CREATE) {
......@@ -493,15 +545,15 @@
});
setInterval(function() {
var port, room, _results;
var room, _j, _len1, _results;
_results = [];
for (port in rooms_port_process) {
room = rooms_port_process[port];
for (_j = 0, _len1 = rooms.length; _j < _len1; _j++) {
room = rooms[_j];
if (room.alive) {
_results.push(room.alive = false);
} else {
console.log("killed " + port + " " + room);
_results.push(room.kill());
console.log("kill " + port + " " + room);
_results.push(room.process.kill());
}
}
return _results;
......
......@@ -6,5 +6,5 @@
"ygopro-server.coffee"
],
"names": [],
"mappings": ";AAAA;CAAA,KAAA,uUAAA;;CAAA,CAAA,CAAA,EAAM,EAAA;;CAAN,CACA,CAAO,CAAP,EAAO,CA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qC,CAAzB,EAAd,GAAwC,OAA9B,GAAV;CACqB,EAAR,CAAP,EAHR,CAGsB,EAHtB,GAAA;CAIO,EAAQ,CAAT,CAAJ,cAAA;YALJ;UAHF;MAAA,EAAA;CAUU,EAAR,IAAO,QAAP,gBAAA;QAZM;CAFV,IAEU;CAvZZ,GAoZA;;CApZA,CAqaA,CAAY,MAAA,EAAZ;CACE,OAAA,iBAAA;AAAA,CAAA;UAAA,oCAAA;wBAAA;CACE,GAAG,CAAH,CAAA;CACE,EAAa,CAAT,CAAJ;MADF,EAAA;CAGE,EAAA,CAAa,GAAN,CAAP;CAAA,GACI,GAAQ;QALhB;CAAA;qBADU;CAAZ,CAOE,CAPU,GAAZ;;CAYA;;;;;;;;;;;;;;CAjbA;;CAgcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAhcA;CAAA"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment