posted 16 years ago
hi all,
i'm a newbie in socket programming. i'm trying to implement client n server which could send and receive messages continously, unless one of them closes the socket.
this is the construct that i'v been able to come up with for server n client-
Server:
Client-
------------------------------------------------------------------
Whenever I try to run this both server and client hang.....
I tried closing the socket after a read (at server) and write( at client).....then creating new one for the other pair of I/O operations....that works.....
but, I wanna do it using a single socket connection at a given port....
assuming I'll be using server n client on the same type of OS, I'm using buferred I/O......
Could anyone suggest me way or gimme the basic construct of server n client to implement the above prog?
Thanks,
ajay
[ October 16, 2008: Message edited by: Ajay V Krishnaprasad ]