英文:
Do Java TCP streams have to be recreated after each connection?
问题
我正在开发一个J2ME应用程序,但套接字行为可能与J2SE相似,而且几乎没有人在使用J2ME,所以我认为值得了解J2SE是如何处理的。
当我发送一个TCP消息,然后接收一个响应时,是否应该无法继续使用先前发送消息的流?我必须要特意关闭先前的连接并创建一个新连接吗?
英文:
I'm working on a J2ME application but it's likely socket behaviour is similar in J2SE and almost no one is using J2ME so I think it's worth understanding how J2SE does it.
When I send a TCP message, then receive a response, am I supposed to be unable to continue using the streams from the previous message sent? Must I go out of my way to destroy the previous connection and create a new one?
专注分享java语言的经验与见解,让所有开发者获益!
评论