var searchIndex = {}; searchIndex["cobalt"] = {"doc":"","items":[[0,"shared","cobalt","Structures related to UDP connection handling.",null,null],[3,"Config","cobalt::shared","A connection configuration object.",null,null],[12,"send_rate","","Number of packets send per second. Default is `30`.",0,null],[12,"congestion_divider","","Division factor used to reduce the number of packets send per second in\ncase of network congestion. Default is `3`.",0,null],[12,"packet_max_size","","Maximum bytes that can be received / send in one packet. Default\n`1400`.",0,null],[12,"protocol_header","","32-Bit Protocol ID used to identify UDP related packets. Default is\n`[1, 2, 3, 4]`.",0,null],[12,"packet_drop_threshold","","Maximum RTT in milliseconds before a packet is considered lost. Default\nis `1000`.",0,null],[12,"connection_init_threshold","","Maximum time in milliseconds until the first packet must be received\nbefore a connection attempt fails. Default is `100`.",0,null],[12,"connection_drop_threshold","","Maximum time in milliseconds between any two packets before the\nconnection gets dropped. Default is `1000`.",0,null],[12,"congestion_rtt_threshold","","Maximum RTT in milliseconds before turning on congestion avoidance\nby throttling the amount of send seconds per second. Default is `250`.",0,null],[12,"congestion_switch_wait","","Interval time in milliseconds between congestion avoidance checks.\nDefault is `10000`.",0,null],[12,"congestion_switch_min_delay","","Minimum milliseconds between turning on / off congestion avoidance.\nDefault is `1000`.",0,null],[12,"congestion_switch_max_delay","","Maximum milliseconds between turning on / off congestion avoidance.\nDefault is `60000`.",0,null],[3,"Connection","","Implementation of reliable UDP based messaging protocol.",null,null],[3,"ConnectionID","","The Connection ID type.",null,null],[12,"0","","",1,null],[3,"Socket","","A Non-blocking abstraction over a UDP socket.",null,null],[4,"ConnectionState","","A value indicating the current state of a connection.",null,null],[13,"Connecting","","The connection has been opened but has yet to receive the first\nincoming packet.",2,null],[13,"Connected","","The remote has responded and at least one incoming packet has been\nreceived.",2,null],[13,"FailedToConnect","","The remote did not respond with the first packet within the maximum\nconfigured time frame for establishing a connection.",2,null],[13,"Lost","","The remote did not send any packets within the maximum configured time\nframe between any two packets.",2,null],[13,"Closed","","The connection has been closed programmatically.",2,null],[11,"clone","","",0,null],[11,"new","","",0,{"inputs":[],"output":{"name":"config"}}],[11,"clone","","",2,null],[11,"eq","","",2,null],[11,"clone","","",1,null],[11,"hash","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"new","","Creates a new Virtual Connection over the given `SocketAddr`.",3,{"inputs":[{"name":"config"}],"output":{"name":"connection"}}],[11,"id_from_packet","","Extracts a connection id from a valid packet header.",3,null],[11,"is_open","","Returns whether the connection is currently accepting any incoming\npackets.",3,null],[11,"is_congested","","Return whether the connection is currently congested and should be\nsending less data.",3,null],[11,"get_id","","Returns the id of the connection.",3,null],[11,"get_state","","Returns the current state of the connection.",3,null],[11,"get_rtt","","Returns the average roundtrip time for the connection.",3,null],[11,"get_packet_loss","","Returns the percent of packets that were sent and never acknowledged\nover the total number of packets that have been send across the\nconnection.",3,null],[11,"write","","Appends to the data that is going to be send with the next outgoing\npacket.",3,null],[11,"read","","Returns the data contained by the last received packet.",3,null],[11,"receive","","Receives a incoming UDP packet.",3,null],[11,"send","","Creates a new outgoing UDP packet.",3,null],[11,"reset","","Resets the connection for re-use with another address.",3,null],[11,"close","","Closes the connection, no further packets will be received or send.",3,null],[0,"handler","","",null,null],[8,"Handler","cobalt::shared::handler","Trait for implementation of client / server event handling.",null,null],[11,"bind","","Method that is called once a `Server` has successfully bound itself\nto its local address.",4,null],[11,"tick_connections","","Method that is called each time a `Server` "ticks". A "tick" occurs\nin-between the receiving and sending data from / to connections.",4,null],[11,"shutdown","","A method that is called once a `Server` is going to shutdown.",4,null],[11,"connect","","Method that is called once a `Client` has successfully bound itself\nto its local address.",4,null],[11,"tick_connection","","Method that is called each time a `Client` "ticks". A "tick" occurs\nin-between the receiving and sending data from / to connections.",4,null],[11,"close","","Method that is called once a `Client` is going to close.",4,null],[11,"connection","","Method that is called each time a new connection is established.",4,null],[11,"connection_failed","","Method that is called each time a connection fails to establish.",4,null],[11,"connection_packet_lost","","Method that is called each time a packet send by a connection is lost.",4,null],[11,"connection_congested","","Method that is called each time the congestion state of connection\nchanges.",4,null],[11,"connection_lost","","Method that is called each time a connection is lost and dropped.",4,null],[11,"new","cobalt::shared","Tries to create a new UDP socket by binding to the specified address.",5,{"inputs":[{"name":"t"},{"name":"usize"}],"output":{"name":"result"}}],[11,"local_addr","","Returns the socket address of the underlying UdpSocket.",5,null],[11,"reader","","Returns the channel receiver for incoming UDP packets.",5,null],[11,"send","","Sends `data` to the specified remote address.",5,null],[11,"shutdown","","Shuts down the socket by stopping its internal reader thread.",5,null],[11,"drop","","",5,null],[6,"SocketReader","","A channel receiver for UDP packets.",null,null],[0,"server","cobalt","Structures related for a multi-client UDP server implementation.",null,null],[3,"Server","cobalt::server","A multi-client server that uses a reliable UDP connection for\nunreliable packet transmission.",null,null],[11,"new","","Creates a new server with the given connection configuration.",6,{"inputs":[{"name":"config"}],"output":{"name":"server"}}],[11,"bind","","Tries to bind a reliable UDP based server to the specified local\naddress which actively listens and manages incoming client connections.",6,null],[11,"shutdown","","Shutsdown the server, closing all its active connections.",6,null],[0,"client","cobalt","Structures related to a UDP client implementation.",null,null],[3,"Client","cobalt::client","A server client that uses a reliable UDP connection for unreliable packet\ntransmission.",null,null],[11,"new","","Creates a new client with the given connection configuration.",7,{"inputs":[{"name":"config"}],"output":{"name":"client"}}],[11,"connect","","Tries to establish a reliable UDP based connection to the server\nspecified by the address.",7,null],[11,"close","","Closes the clients connections to the server.",7,null]],"paths":[[3,"Config"],[3,"ConnectionID"],[4,"ConnectionState"],[3,"Connection"],[8,"Handler"],[3,"Socket"],[3,"Server"],[3,"Client"]]}; initSearch(searchIndex);