Is there a way to extend SocketChannel in java so that the selection key will return my (let's say Client) class? I think that i have to implement a socketFactory or something.
Please help Thank you
For what purpose? If you need context with your SocketChannel, that's what the attachment is for. Basic answer is 'no'.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.