Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > socket programming related.

Reply
Thread Tools

socket programming related.

 
 
hari.siri74@gmail.com
Guest
Posts: n/a
 
      07-12-2007
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.

 
Reply With Quote
 
 
 
 
hari.siri74@gmail.com
Guest
Posts: n/a
 
      07-12-2007
On Jul 11, 7:32 pm, (E-Mail Removed) 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.

 
Reply With Quote
 
 
 
 
Simon Percivall
Guest
Posts: n/a
 
      07-12-2007
On Jul 12, 2:35 am, (E-Mail Removed) wrote:
> On Jul 11, 7:32 pm, (E-Mail Removed) 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).

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Steve Holden Python 1 02-03-2009 06:20 AM
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Steve Holden Python 0 02-01-2009 12:45 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 0 02-01-2009 07:37 AM
socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 1 01-27-2009 05:05 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48,'Address already in use') Jean-Paul Calderone Python 0 01-27-2009 01:41 PM



Advertisments