简体   繁体   中英

Monitoring stream sockets Java

Is there any way to monitor the stream data from any existing socket?

I mean, I want to create a socket that will catch all the stream from another socket and redirect it to my server. Is it possible?

Sure. You can implement your server that opens ServerSocket, reads from input stream and writes to output stream of other socket. Take a look on PipedInputStream and PipedOutputStream. These classes may help you to implement your task.

But if you just want to see what is passed via network, why not to use WireShark?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM