java: Single socket on read write operation. Full duplex
问题 I have to implement sending data with specific source port and in the same time listen to that port. Full duplex. Does anybody know how to implement it on java. I tried to create separate thread for listening on socket input stream but it doesnt work. I cannot bind ServerSocket and client socket to the same source port and the the same with netty. It there any solution for dull duplex? init(){ socket = new Socket(InetAddress.getByName(Target.getHost()), Target.getPort(), InetAddress.getByName