Display: less messages.

dev
Karchnu 4 years ago
parent 209690d9e4
commit b7300ef529

@ -170,7 +170,7 @@ rescue e
end
def ws_cb_out(fd : Int32, pm : Pointer(LibIPC::Message))
info "OUT fd is #{fd}"
# info "OUT fd is #{fd}"
wsclient = Context.context.fd_to_websocket[fd]
message = IPC::Message.new pm
@ -192,7 +192,7 @@ rescue e
end
def ws_cb_in(fd : Int32, pm : LibIPC::Message*, more_to_read : Int16*)
info "IN fd is #{fd}"
# info "IN fd is #{fd}"
wsclient = Context.context.fd_to_websocket[fd]
@ -303,26 +303,28 @@ def main
sending_ping_messages
when IPC::Event::Connection
info "#{CBLUE}IPC::Event::Connection#{CRESET}: #{event.fd}"
info "#{CBLUE}IPC::Event::Connection#{CRESET}: fd #{event.fd}"
when IPC::Event::Disconnection
info "#{CBLUE}IPC::Event::Disconnection#{CRESET}: #{event.fd}"
info "#{CBLUE}IPC::Event::Disconnection#{CRESET}: fd #{event.fd}"
Context.context.remove_fd event.fd
when IPC::Event::ExtraSocket
info "#{CBLUE}IPC::Event::ExtraSocket#{CRESET}: #{event.fd}"
info "#{CBLUE}IPC::Event::ExtraSocket#{CRESET}: fd #{event.fd}"
if server.fd != event.fd
raise "Error: the only extra socket should be the TCP/WS server"
end
handle_new_clients(service, server)
when IPC::Event::Switch
info "\033[36mIPC::Event::Switch#{CRESET}: from fd #{event.fd}"
info "\033[36mIPC::Event::Switch#{CRESET}: fd #{event.fd}"
# raise "Not implemented."
when IPC::Event::MessageSent
info "Message sent, for #{event.fd}"
info "#{CBLUE}IPC::Event::MessageSent#{CRESET}: fd #{event.fd}"
when IPC::Event::MessageReceived
info "#{CBLUE}IPC::Event::Message#{CRESET}: #{event.fd}"
info "#{CBLUE}IPC::Event::Message#{CRESET}: fd #{event.fd}"
raise "Not implemented."
end

Loading…
Cancel
Save