由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - how to transfer data between two sockets
相关主题
Socket Connection refused in high-loaded serversjava socket 问题
Re: 如何从Datagram Socket里读objectone question
Re: Client-Server and actionPerformed一个socket相关的问题
Re: java程序里的socket & CORBAquestion on single thread & multithread
Help: 有大虾在 Applet 中用过 UDP socket 麽?socket and simple web browser
Re: 推荐推荐如何让两个socket并行执行thread
Re: [转载] 如何看某个端口是否被占用?(use UNIX command or ..)有人用过异步Socket么?
why it does not work?? :(((java Socket different in Windows and Lin
相关话题的讨论汇总
话题: sockets话题: transfer话题: line话题: data话题: two
进入Java版参与讨论
1 (共1页)
c*******t
发帖数: 32
1
I need transfer data between two sockets. After create two sockets,
I use the below code to transfer data. When I type the first line,
I got the response line from another socket. But when I type one more
line, the another socket cannot get this line. Could somebody help me?
while ( (numBytesClient = fromClient.read(bufferClient)) != -1) {
toAnotherClient.write(bufferClient,0,numBytesClient);
toAnotherClient.flush();
}
while ((numBytesAnotherClient = fromAnotherClient.read(bufferAnother))
1 (共1页)
进入Java版参与讨论
相关主题
java Socket different in Windows and LinHelp: 有大虾在 Applet 中用过 UDP socket 麽?
get full class nameRe: 推荐推荐
How to make RMI bypass firewall?Re: [转载] 如何看某个端口是否被占用?(use UNIX command or ..)
有关JBOSS-MQ问题why it does not work?? :(((
Socket Connection refused in high-loaded serversjava socket 问题
Re: 如何从Datagram Socket里读objectone question
Re: Client-Server and actionPerformed一个socket相关的问题
Re: java程序里的socket & CORBAquestion on single thread & multithread
相关话题的讨论汇总
话题: sockets话题: transfer话题: line话题: data话题: two