the client sends us-ascii encoded data and server reads it and processes it.
the server used selector based multiplexing for doing the job. it is as follow.
forever selector.select() some channel is interested so get channel if channel is acceptable accept it and register it with selector with read/write operations if channel is readable read it into byte buffer if channel is writable write a bytebuffer into it end forever
now my perl client just tries to open a Socket and send data. It does not try to receive anything. My server accpets connection, reads data and also tries to write data on channel.
how is it possible as perl client does not try to read from the socket.
how is it possible as perl client does not try to read from the socket.
Your question appears to be "how can my server receive data if my perl client does not read the reply?" The answer to that question would be that the server receiving the data is not dependent on the client reading it. A socket is just a transport mechanism. It doesn't care what the protocol (standard for data exchange) is. It carries what you tell it to from one end to the other. If the other end isn't listening, the data vanishes when the sockets close. No harm done. Now if you were violating the protocol (i.e. having the client read before sending data) you'd have a problem.