Created
January 2, 2011 14:10
-
-
Save tizoc/762554 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* http://ocaml.janestreet.com/?q=node/75 *) | |
| (* 1ra *) | |
| type connection_state = | |
| | Connecting | |
| | Connected | |
| | Disconnected | |
| type connection_info = { | |
| state: connection_state; | |
| server: Inet_addr.t; | |
| last_ping_time: Time.t option; | |
| last_ping_id: int option; | |
| session_id: string option; | |
| when_initiated: Time.t option; | |
| when_disconnected: Time.t option; | |
| } | |
| (* 2da *) | |
| type connecting = { when_initiated: Time.t; } | |
| type connected = { last_ping: (Time.t * int) option; | |
| session_id: string; } | |
| type disconnected = { when_disconnected: Time.t; } | |
| type connection_state = | |
| | Connecting of connecting | |
| | Connected of connected | |
| | Disconnected of disconnected | |
| type connection_info = { | |
| state: connection_state; | |
| server: Inet_addr.t; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment