(no subject)

Vijay Anand R. Vijayanandr at elind.com
Fri May 30 05:27:50 EDT 2003


hai magnus

thanx for the reply

no i do send and also receive the message and the function sendmsg returns the received msg

can u list me the reasons for a program to get hang esp due to the usage of sockets?

 

 

-----Original Message-----

From: Magnus [mailto:me at privacy.net]

Sent: Friday, May 30, 2003 2:37 PM

To: python-list at python.org

Subject: Re: URG: Help need in socket programming

 

Vijay Anand R. wrote:

> hai

> 

> can any help me in solving my problem with python sockets?

> 

> 

> i am involved in testing the functionality of a financial exchange soln

> named STRIDE. it uses FIX protocol

> 

> i am using non blocking sockets. i find some problems while sending the

> invalid testcases. the test case that have appln based error gets rejected

> by the STRIDE and i am able to receive the error message. but when i send

> test cases with improper data format, the FIX gateway rejects it. but i am

> not able to capture the error. my testing tool gets hanged. i am running

> using IDLE.

> 

> this is my code - can anyone help me in this regard

> 

> 

> 

> def sendMsg(user,port,msg,login):

> 

> global signUser, sock, fNameCount

> 

> if login == 1:

> lNMsg = 1

> else:

> lNMsg = 2

> dump = ''

> count = 0

> while 1:

> count = count + 1

> data = sock[user].recv(BUFSIZ)

> dump = dump + data

> 

> if login == 1:

> signUser[user] = getSign(data)

> 

> if not data or count >= lNMsg : break

> 

> return dump

> 

> 

> 

> 

> regards

> 

> R Vijay Anand

> 

> Project Trainee, Elind Computer Pvt Ltd,

> 100 Feet Road, HAL 2nd Stage,Indiranagar,

> Bangalore 560038. INDIA

> Tel : 080 5216767 Extn : 290

> 

> "It's easier to put on slippers than to carpet the whole world."

 

I don't understand what you are trying to achieve?

Though I noticed your function is called *sendMessage* but you do a *recv*

can this be a problem?

 

-- 

http://mail.python.org/mailman/listinfo/python-list

regards
 
R Vijay Anand
 
Project Trainee, Elind Computer Pvt Ltd, 
100 Feet Road, HAL 2nd Stage,Indiranagar, 
Bangalore 560038. INDIA 
Tel : 080 5216767 Extn : 290
 
"It's easier to put on slippers than to carpet the whole world."
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20030530/90fee051/attachment.html>


More information about the Python-list mailing list