socket programming related.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hari.siri74@gmail.com

    #1

    socket programming related.

    I have just started working in network programming using python.
    written code for socket connection between client and server. Client
    sent data to server for server processing (also server echoing back
    rcvd data to client). When there is ("if no data": break ) no data
    from client then the while loops break in server. The server program
    process recvd data and my requirement is to send back the *results* to
    client program for user sake. I did many trials but no use, as these
    socket calls are blocking, i could not make my req.

  • hari.siri74@gmail.com

    #2
    Re: socket programming related.

    On Jul 11, 7:32 pm, hari.sir...@gma il.com wrote:
    I have just started working in network programming using python.
    written code for socket connection between client and server. Client
    sent data to server for server processing (also server echoing back
    rcvd data to client). When there is ("if no data": break ) no data
    from client then the while loops break in server. The server program
    process recvd data and my requirement is to send back the *results* to
    client program for user sake. I did many trials but no use, as these
    socket calls are blocking, i could not make my req.
    I just need to add a line. The while loop in server breaks when the
    sockObj.close() happens in client program indicating there is no data
    from client.

    Comment

    • Simon Percivall

      #3
      Re: socket programming related.

      On Jul 12, 2:35 am, hari.sir...@gma il.com wrote:
      On Jul 11, 7:32 pm, hari.sir...@gma il.com wrote:
      >
      I have just started working in network programming using python.
      written code for socket connection between client and server. Client
      sent data to server for server processing (also server echoing back
      rcvd data to client). When there is ("if no data": break ) no data
      from client then the while loops break in server. The server program
      process recvd data and my requirement is to send back the *results* to
      client program for user sake. I did many trials but no use, as these
      socket calls are blocking, i could not make my req.
      >
      I just need to add a line. The while loop in server breaks when the
      sockObj.close() happens in client program indicating there is no data
      from client.
      Well, you shouldn't do a close() on the client socket, you should do a
      shutdown(1).

      Comment

      Working...