ipc.cr-old/src/ipc/event.cr

55 lines
958 B
Crystal
Raw Normal View History

2019-07-27 15:29:27 +02:00
class IPC::Event
2020-07-02 21:13:54 +02:00
alias Events = IPC::Event::Timer |
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-07-02 21:13:54 +02:00
class IPC::Event::Timer < IPC::Event
def initialize
end
2020-07-02 21:13:54 +02:00
end
2020-07-02 21:13:54 +02:00
class IPC::Event::Base < IPC::Event
2020-07-02 22:36:51 +02:00
property fd : Int32
property index : UInt32
2019-07-27 15:29:27 +02:00
2020-07-02 21:13:54 +02:00
def initialize(@fd, @index)
2019-07-27 15:29:27 +02:00
end
2020-07-02 21:13:54 +02:00
end
2019-07-27 15:29:27 +02:00
2020-07-02 21:13:54 +02:00
class IPC::Event::Connection < IPC::Event::Base
end
2019-07-27 15:29:27 +02:00
2020-07-02 21:13:54 +02:00
class IPC::Event::Disconnection < IPC::Event::Base
end
2019-07-27 15:29:27 +02:00
2020-07-02 21:13:54 +02:00
class IPC::Event::Error < IPC::Event::Base
end
2019-07-27 15:29:27 +02:00
2020-07-02 21:13:54 +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-02 21:13:54 +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