{"action":"closed","issue":{"url":"https://api.github.com/repos/line/armeria/issues/1438","repository_url":"https://api.github.com/repos/line/armeria","labels_url":"https://api.github.com/repos/line/armeria/issues/1438/labels{/name}","comments_url":"https://api.github.com/repos/line/armeria/issues/1438/comments","events_url":"https://api.github.com/repos/line/armeria/issues/1438/events","html_url":"https://github.com/line/armeria/issues/1438","id":380593816,"node_id":"MDU6SXNzdWUzODA1OTM4MTY=","number":1438,"title":"Expose TransportType to users?","user":{"login":"anuraaga","id":198344,"node_id":"MDQ6VXNlcjE5ODM0NA==","avatar_url":"https://avatars0.githubusercontent.com/u/198344?v=4","gravatar_id":"","url":"https://api.github.com/users/anuraaga","html_url":"https://github.com/anuraaga","followers_url":"https://api.github.com/users/anuraaga/followers","following_url":"https://api.github.com/users/anuraaga/following{/other_user}","gists_url":"https://api.github.com/users/anuraaga/gists{/gist_id}","starred_url":"https://api.github.com/users/anuraaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuraaga/subscriptions","organizations_url":"https://api.github.com/users/anuraaga/orgs","repos_url":"https://api.github.com/users/anuraaga/repos","events_url":"https://api.github.com/users/anuraaga/events{/privacy}","received_events_url":"https://api.github.com/users/anuraaga/received_events","type":"User","site_admin":false},"labels":[{"id":287373881,"node_id":"MDU6TGFiZWwyODczNzM4ODE=","url":"https://api.github.com/repos/line/armeria/labels/new-feature","name":"new-feature","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/line/armeria/milestones/122","html_url":"https://github.com/line/armeria/milestone/122","labels_url":"https://api.github.com/repos/line/armeria/milestones/122/labels","id":3802052,"node_id":"MDk6TWlsZXN0b25lMzgwMjA1Mg==","number":122,"title":"0.76.0","description":null,"creator":{"login":"trustin","id":173918,"node_id":"MDQ6VXNlcjE3MzkxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/173918?v=4","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":13,"state":"open","created_at":"2018-11-07T04:06:29Z","updated_at":"2018-11-19T03:50:15Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-11-14T08:51:53Z","updated_at":"2018-11-19T03:50:14Z","closed_at":"2018-11-19T03:50:14Z","author_association":"COLLABORATOR","body":"I needed to write a TCP client in an armeria server and ended up using the `TransportType` internal class to also take advantage of `CommonPools`. Since we expose `CommonPools`, does it make sense to expose `TransportType` for this sort of use case? Maybe it's overkill, just want to get it out there.\r\n\r\n```java\r\n    var workerGroup = CommonPools.workerGroup();\r\n    var bootstrap = new Bootstrap();\r\n    bootstrap.group(workerGroup);\r\n    // NOTE(rag): This is an internal API, but should be stable. Will see about exposing it to\r\n    // users.\r\n    bootstrap.channel(TransportType.socketChannelType(workerGroup));\r\n    bootstrap.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT);\r\n    bootstrap.option(ChannelOption.SO_KEEPALIVE, true);\r\n    bootstrap.handler(\r\n        new ChannelInitializer<SocketChannel>() {\r\n          @Override\r\n          protected void initChannel(SocketChannel ch) {\r\n            ch.pipeline().addLast(new Handler());\r\n          }\r\n        });\r\n\r\n    channel = bootstrap.connect(target.getHost(), target.getPort()).syncUninterruptibly().channel();\r\n```"}}
{"actor":{"display_login":"trustin"}}