473,375 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,375 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 959
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Poiquiop | last post by:
Hi. I was wondering if there were any good tutorials related to socket programming, and handling different protocols, etc. Thanks, J.L.
2
by: priya | last post by:
Hi All, Currently I am working in Socket Progrm written in C. Here i pasted Both Server and client code.. Server.c code
14
by: DaTurk | last post by:
I am makeing a Multicast server client setup and was wondering what the difference is between Socket.Connect, and Socket.Bind. It may be a stupid question, but I was just curious. Because I...
3
by: Carl | last post by:
Recently I got a problem with LINUX C socket programming. I want to get how many clients are waiting for being accepted in the socket server pending queue . I'm trying to find the answer from the...
8
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi all, I am new to .net technologies. ASP.NET supports socket programming like send/receive in c or c++? I am developing web-site application in asp.net and code behind is Visual C#. In...
3
by: =?Utf-8?B?UGFpbiBhbmQgaGVhZGFjaGU=?= | last post by:
Hi, I am trying to get a webpage using a TcpSocket instead of a standard Webrequest. Initial, it works fine but after the 2 or 3 request the tcpclient I start to get the following error: A...
2
by: srinivasan srinivas | last post by:
Hi, I am going to do some socket related programming in Python. Before that, I wish to know the Gotchas of Python Scoket Programming. Can anyone send me any link that satisfies my needs?? Thanks,...
1
by: =?iso-8859-1?q?C=E9dric_Lucantis?= | last post by:
Hi, Le Friday 13 June 2008 18:29:06 srinivasan srinivas, vous avez écrit : Yes, the friendly manual :) http://docs.python.org/lib/module-socket.html and if you want to know more about...
1
by: =?Utf-8?B?UmFqbmk=?= | last post by:
Dear Sir/Mam, I have written a server code using the Windows Socket API's. Wherein I have created the socket and bound it to a particular IP address and port number. Later I have made the socket...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.