471,347 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,347 software developers and data experts.

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.

Jul 12 '07 #1
2 914
On Jul 11, 7:32 pm, hari.sir...@gmail.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.

Jul 12 '07 #2
On Jul 12, 2:35 am, hari.sir...@gmail.com wrote:
On Jul 11, 7:32 pm, hari.sir...@gmail.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).

Jul 12 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Poiquiop | last post: by
2 posts views Thread by priya | last post: by
3 posts views Thread by Carl | last post: by
8 posts views Thread by =?Utf-8?B?Sm9obg==?= | last post: by
3 posts views Thread by =?Utf-8?B?UGFpbiBhbmQgaGVhZGFjaGU=?= | last post: by
2 posts views Thread by srinivasan srinivas | last post: by
1 post views Thread by =?iso-8859-1?q?C=E9dric_Lucantis?= | last post: by
1 post views Thread by =?Utf-8?B?UmFqbmk=?= | last post: by
reply views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.