2019-07-27 15:29:27 +02:00
|
|
|
|
|
|
|
class IPC::Event
|
2020-07-13 14:17:29 +02:00
|
|
|
alias Events = IPC::Event::Timer |
|
2020-11-07 02:40:05 +01:00
|
|
|
IPC::Event::EventNotSet |
|
2020-07-13 14:17:29 +02:00
|
|
|
IPC::Event::Error |
|
|
|
|
IPC::Event::Connection |
|
|
|
|
IPC::Event::Disconnection |
|
|
|
|
IPC::Event::MessageReceived |
|
|
|
|
IPC::Event::ExtraSocket |
|
|
|
|
IPC::Event::Switch |
|
|
|
|
IPC::Event::LookUp |
|
|
|
|
IPC::Event::MessageSent
|
|
|
|
end
|
2020-01-01 14:29:05 +01:00
|
|
|
|
2020-07-13 14:17:29 +02:00
|
|
|
class IPC::Event::Timer < IPC::Event
|
|
|
|
def initialize
|
2019-10-26 18:12:59 +02:00
|
|
|
end
|
2020-07-13 14:17:29 +02:00
|
|
|
end
|
2019-10-26 18:12:59 +02:00
|
|
|
|
2020-07-13 14:17:29 +02:00
|
|
|
class IPC::Event::Base < IPC::Event
|
|
|
|
property fd : Int32
|
|
|
|
property index : UInt32
|
2019-07-27 15:29:27 +02:00
|
|
|
|
2020-07-13 14:17:29 +02:00
|
|
|
def initialize(@fd, @index)
|
2019-07-27 15:29:27 +02:00
|
|
|
end
|
2020-07-13 14:17:29 +02:00
|
|
|
end
|
2019-07-27 15:29:27 +02:00
|
|
|
|
2020-07-13 14:17:29 +02:00
|
|
|
class IPC::Event::Connection < IPC::Event::Base
|
|
|
|
end
|
2019-07-27 15:29:27 +02:00
|
|
|
|
2020-07-13 14:17:29 +02:00
|
|
|
class IPC::Event::Disconnection < IPC::Event::Base
|
|
|
|
end
|
2019-07-27 15:29:27 +02:00
|
|
|
|
2020-07-13 14:17:29 +02:00
|
|
|
class IPC::Event::Error < IPC::Event::Base
|
|
|
|
end
|
2019-07-27 15:29:27 +02:00
|
|
|
|
2020-07-13 14:17:29 +02:00
|
|
|
class IPC::Event::MessageReceived < IPC::Event::Base
|
|
|
|
getter message : ::IPC::Message
|
|
|
|
|
|
|
|
def initialize(@fd, @index, @message)
|
2019-07-27 15:29:27 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-07-13 14:17:29 +02:00
|
|
|
class IPC::Event::ExtraSocket < IPC::Event::Base
|
|
|
|
end
|
|
|
|
|
|
|
|
class IPC::Event::Switch < IPC::Event::Base
|
|
|
|
end
|
|
|
|
|
|
|
|
class IPC::Event::LookUp < IPC::Event::Base
|
|
|
|
end
|
|
|
|
|
|
|
|
class IPC::Event::MessageSent < IPC::Event::Base
|
|
|
|
end
|
|
|
|
|
2020-11-07 02:40:05 +01:00
|
|
|
class IPC::Event::EventNotSet < IPC::Event::Base
|
|
|
|
end
|
|
|
|
|