dcsimg
client server communication using channels
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   suparna_v
Posted On:   Monday, September 6, 2004 04:10 AM

question on client server communication using channels I have a clinet prog and a server prog. i have separate methods for connecting , to send data,receive data in each ,one for client prog and one for server prog. iam using ByteBuffers too so basically iam doing At client side: sendata to server via clientbuffer ->Socketchannel-> to the server. receive data from server via SocketChannel->clientbuffer At server end: reading data from client read into serverbuffer from socketChannel send data to client serverbuffer->socketChannel->clientchannel->clientbuffer I donot use selectprovi   More>>

question on client server communication using channels


I have a clinet prog and a server prog.
i have separate methods for connecting , to send data,receive data in each ,one for client prog and one for server prog.
iam using ByteBuffers too
so basically iam doing

At client side:
sendata to server via
clientbuffer ->Socketchannel-> to the server.


receive data from server via
SocketChannel->clientbuffer

At server end:
reading data from client
read into serverbuffer from socketChannel

send data to client
serverbuffer->socketChannel->clientchannel->clientbuffer


I donot use selectprovider when creating Socket Channel;
i encounter IO exceptions sometimes and null pointer exceptions often.can you send me a simple code for communication between client and server where in i have a connect(),senddata(),receive data() in each of the programmes ie separate for client separate for server

   <<Less
About | Sitemap | Contact