[ {"type":"Keyword","value":"use"}, {"type":"Text","value":" "}, {"type":"LiteralString","value":"\"net\""}, {"type":"Text","value":"\n"}, {"type":"Keyword","value":"use"}, {"type":"Text","value":" "}, {"type":"LiteralString","value":"\"files\""}, {"type":"Text","value":"\n\n"}, {"type":"Keyword","value":"class"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"ClientSide"}, {"type":"Text","value":" "}, {"type":"OperatorWord","value":"is"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"TCPConnectionNotify"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"Env"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"new"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"iso"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"create"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"Env"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"=\u003e"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_env"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Name","value":"env"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"fun"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"ref"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"connecting"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"conn"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"TCPConnection"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"ref"}, {"type":"Punctuation","value":","}, {"type":"Text","value":" "}, {"type":"Name","value":"count"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"U32"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"=\u003e"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"out"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"print"}, {"type":"Punctuation","value":"("}, {"type":"LiteralString","value":"\"connecting: \""}, {"type":"Text","value":" "}, {"type":"Operator","value":"+"}, {"type":"Text","value":" "}, {"type":"Name","value":"count"}, {"type":"Punctuation","value":"."}, {"type":"NameOther","value":"string()"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"fun"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"ref"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"connected"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"conn"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"TCPConnection"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"ref"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"=\u003e"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"try"}, {"type":"Text","value":"\n "}, {"type":"Punctuation","value":"("}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"host"}, {"type":"Punctuation","value":","}, {"type":"Text","value":" "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"service"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Name","value":"conn"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"remote_address"}, {"type":"Punctuation","value":"()."}, {"type":"Name","value":"name"}, {"type":"Punctuation","value":"()?"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"out"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"print"}, {"type":"Punctuation","value":"("}, {"type":"LiteralString","value":"\"connected to \""}, {"type":"Text","value":" "}, {"type":"Operator","value":"+"}, {"type":"Text","value":" "}, {"type":"Name","value":"host"}, {"type":"Text","value":" "}, {"type":"Operator","value":"+"}, {"type":"Text","value":" "}, {"type":"LiteralString","value":"\":\""}, {"type":"Text","value":" "}, {"type":"Operator","value":"+"}, {"type":"Text","value":" "}, {"type":"Name","value":"service"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"conn"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"set_nodelay"}, {"type":"Punctuation","value":"("}, {"type":"Keyword","value":"true"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"conn"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"set_keepalive"}, {"type":"Punctuation","value":"("}, {"type":"LiteralNumberInteger","value":"10"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"conn"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"write"}, {"type":"Punctuation","value":"("}, {"type":"LiteralString","value":"\"client says hi\""}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"end"}, {"type":"Text","value":"\n\n"}, {"type":"Keyword","value":"class"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"Listener"}, {"type":"Text","value":" "}, {"type":"OperatorWord","value":"is"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"TCPListenNotify"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"Env"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"_limit"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"USize"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"var"}, {"type":"Text","value":" "}, {"type":"Name","value":"_host"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"String"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"LiteralString","value":"\"\""}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"var"}, {"type":"Text","value":" "}, {"type":"Name","value":"_count"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"USize"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"LiteralNumberInteger","value":"0"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"new"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"create"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"Env"}, {"type":"Punctuation","value":","}, {"type":"Text","value":" "}, {"type":"Name","value":"limit"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"USize"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"=\u003e"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_env"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Name","value":"env"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_limit"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Name","value":"limit"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"fun"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"ref"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"connected"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"listen"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"TCPListener"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"ref"}, {"type":"Punctuation","value":"):"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"TCPConnectionNotify"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"iso"}, {"type":"Punctuation","value":"^"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"=\u003e"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"env"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Name","value":"_env"}, {"type":"Text","value":"\n\n "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"out"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"print"}, {"type":"Punctuation","value":"("}, {"type":"LiteralString","value":"\"Server starting\""}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"server"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"NameClass","value":"ServerSide"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n\n "}, {"type":"Name","value":"_spawn"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"listen"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"server"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"fun"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"ref"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"_spawn"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"listen"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"TCPListener"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"ref"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"=\u003e"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"if"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"_limit"}, {"type":"Text","value":" "}, {"type":"Operator","value":"\u003e"}, {"type":"Text","value":" "}, {"type":"LiteralNumberInteger","value":"0"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"OperatorWord","value":"and"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"_count"}, {"type":"Text","value":" "}, {"type":"Operator","value":"\u003e="}, {"type":"Text","value":" "}, {"type":"Name","value":"_limit"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"then"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"listen"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"dispose"}, {"type":"Punctuation","value":"()"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"return"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"end"}, {"type":"Text","value":"\n\n "}, {"type":"Name","value":"_count"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Name","value":"_count"}, {"type":"Text","value":" "}, {"type":"Operator","value":"+"}, {"type":"Text","value":" "}, {"type":"LiteralNumberInteger","value":"1"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"out"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"print"}, {"type":"Punctuation","value":"("}, {"type":"LiteralString","value":"\"spawn \""}, {"type":"Text","value":" "}, {"type":"Operator","value":"+"}, {"type":"Text","value":" "}, {"type":"Name","value":"_count"}, {"type":"Punctuation","value":"."}, {"type":"NameOther","value":"string()"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"try"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"env"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Name","value":"_env"}, {"type":"Text","value":"\n\n "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"out"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"print"}, {"type":"Punctuation","value":"("}, {"type":"LiteralString","value":"\"Client starting\""}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"NameClass","value":"TCPConnection"}, {"type":"Punctuation","value":"("}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"root"}, {"type":"Text","value":" "}, {"type":"OperatorWord","value":"as"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"AmbientAuth"}, {"type":"Punctuation","value":","}, {"type":"Text","value":"\n "}, {"type":"NameClass","value":"ClientSide"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":"),"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_host"}, {"type":"Punctuation","value":","}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_service"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"else"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"_env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"out"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"print"}, {"type":"Punctuation","value":"("}, {"type":"LiteralString","value":"\"couldn't create client side\""}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"listen"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"close"}, {"type":"Punctuation","value":"()"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"end"}, {"type":"Text","value":"\n\n"}, {"type":"Keyword","value":"actor"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"Main"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"new"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"create"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":":"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"Env"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"=\u003e"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"limit"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Keyword","value":"try"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"args"}, {"type":"Punctuation","value":"("}, {"type":"LiteralNumberInteger","value":"1"}, {"type":"Punctuation","value":")?."}, {"type":"Name","value":"usize"}, {"type":"Punctuation","value":"()?"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"else"}, {"type":"Text","value":"\n "}, {"type":"LiteralNumberInteger","value":"1"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"end"}, {"type":"Text","value":"\n\n "}, {"type":"Keyword","value":"try"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"let"}, {"type":"Text","value":" "}, {"type":"Name","value":"auth"}, {"type":"Text","value":" "}, {"type":"Operator","value":"="}, {"type":"Text","value":" "}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"root"}, {"type":"Text","value":" "}, {"type":"OperatorWord","value":"as"}, {"type":"Text","value":" "}, {"type":"KeywordType","value":"AmbientAuth"}, {"type":"Text","value":"\n "}, {"type":"NameClass","value":"TCPListener"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"auth"}, {"type":"Punctuation","value":","}, {"type":"Text","value":" "}, {"type":"Keyword","value":"recover"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"Listener"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":","}, {"type":"Text","value":" "}, {"type":"Name","value":"limit"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"end"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"NameClass","value":"UDPSocket"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"auth"}, {"type":"Punctuation","value":","}, {"type":"Text","value":" "}, {"type":"Keyword","value":"recover"}, {"type":"Text","value":" "}, {"type":"NameClass","value":"Pong"}, {"type":"Punctuation","value":"("}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"end"}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"else"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"env"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"out"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"print"}, {"type":"Punctuation","value":"("}, {"type":"LiteralString","value":"\"unable to use the network\""}, {"type":"Punctuation","value":")"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"end"}, {"type":"Text","value":"\n "}, {"type":"Keyword","value":"be"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"test"}, {"type":"Punctuation","value":"()"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"=\u003e"}, {"type":"Text","value":"\n "}, {"type":"Name","value":"nonsensical"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"stuff"}, {"type":"Punctuation","value":"."}, {"type":"Name","value":"here"}, {"type":"Punctuation","value":"()"}, {"type":"Text","value":"\n\n"} ]