bedrock-protocol/docs/api.md
u9g d8ff48258c
Add createClient (#61)
* Initial commit

* remove comment

* export obj

* fix export

* add to api.md

* fix old refs to nmp
2021-04-14 23:39:05 +02:00

16 lines
950 B
Markdown

# Documentation
## be.createClient(options)
Returns a `Client` instance and starts listening. All clients will be
automatically logged in and validated against microsoft's auth.
`options` is an object containing the properties :
* host : default to undefined which means listen to all available ipv4 and ipv6 adresses
* port (optional) : default to 25565
(see https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback for details)
* kickTimeout (optional) : default to `10*1000` (10s), kick client that doesn't answer to keepalive after that time
* version (optional) : default to latest stable version, version of server
* autoInitPlayer (optional) : default to true, If we should send SetPlayerInitialized to the server after getting play_status spawn.
* offline (optional) : default to false, whether to auth with microsoft
* connectTimeout (optional) : default to 9000, ms to wait before aborting connection attempt