websocketd/src/network.cr

32 lines
511 B
Crystal

require "ipc"
require "json"
require "ipc/json"
class IPC::JSON
def handle(service : IPC::Server, event : IPC::Event::Events)
raise "unimplemented"
end
end
module Websocketc
class_getter requests = [] of IPC::JSON.class
class_getter responses = [] of IPC::JSON.class
end
class Websocketc::Response
IPC::JSON.message Error, 0 do
property reason : String | Array(String)
def initialize(@reason)
end
end
IPC::JSON.message Success, 1 do
def initialize
end
end
end
require "./requests/*"