{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Transport package","type":"basic","slug":"transport-package","excerpt":"com.github.badoualy.telegram.mtproto.transport","body":"This package handle all the network I/O. As of today, the only protocol implemented is TCP.\nIn the future it may also contain an HTTP implementation.\n\n# MTProtoTcpConnection\nThis class is implementing a TCP connection using java's nio `SocketChannel`. The main reason behind this choice was to be able to use `Selectors`. By doing this, we can listen for messages in `n` connections in a unique thread, which improves scalability greatly.\n\nNote: In a standard Telegram client, you'll have one main connection, and a few (3 or 4 max) connections to upload/download files.","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"57e0fd038929550e00f1d9c2","parentDoc":null,"__v":0,"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"MTProto module","slug":"mtproto-module","order":3,"from_sync":false,"reference":false,"_id":"57e0f141ff540c22007b45fa","version":"5703d527bb69fc1700553ce3","createdAt":"2016-09-20T08:20:17.405Z","__v":0,"project":"5703d527bb69fc1700553ce0"},"user":"5631f962c3b04b0d00ba9bf1","createdAt":"2016-09-20T09:10:27.687Z","version":{"version":"0.0.6","version_clean":"0.0.6","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["5703d527bb69fc1700553ce4","5703d8b7aceacc17003ef303","5703e60b6116142000db25f6","57e0db616a1c2e0e0081fe64","57e0f141ff540c22007b45fa","57e0f14b8929550e00f1d9bc"],"_id":"5703d527bb69fc1700553ce3","createdAt":"2016-04-05T15:09:27.620Z","hasDoc":true,"releaseDate":"2016-04-05T15:09:27.620Z","__v":6,"hasReference":true,"project":"5703d527bb69fc1700553ce0"},"githubsync":"","project":"5703d527bb69fc1700553ce0"}

Transport package

com.github.badoualy.telegram.mtproto.transport

This package handle all the network I/O. As of today, the only protocol implemented is TCP. In the future it may also contain an HTTP implementation. # MTProtoTcpConnection This class is implementing a TCP connection using java's nio `SocketChannel`. The main reason behind this choice was to be able to use `Selectors`. By doing this, we can listen for messages in `n` connections in a unique thread, which improves scalability greatly. Note: In a standard Telegram client, you'll have one main connection, and a few (3 or 4 max) connections to upload/download files.