Open4
scala
こっこの解説が良い。なるほど。
type connecting = { when_initiated: time; }
type connected = { last_ping : (time * int) option;
session_id: string; }
type disconnected = { when_disconnected: time; }
type connection_state =
| Connecting of connecting
| Connected of connected
| Disconnected of disconnected
type connection_info = {
state: connection_state;
server: inet_addr;
}