Solved

GUSI: close(socket) hangs

Posted on 2000-03-07
2
195 Views
Last Modified: 2013-12-26
Hi there,

My system is: MacOS 9, CWP 5, GUSI 2 (config: OpenTransport, StreamSockets)
I have two apps, simple Client/Server using stream sockets. They can also talk fine together.

A strange thing:
- using "struct hostent* phe = gethostbyname()" doesn't return NULL if my host name is nonsens.
  I use instead "if( *(int*)phe->h_name == 0x7fffDEAD))". Sounds really silly but works. Ever heard about that?

My serious problem:
- "close()" never returns. It runs forever in an internal GUSI event loop (in GUSIIOTStreamSocket::close())
  It seems that OT is still waiting for some data from the server which has definitely nothing more to say. An dummy-recv is called, getting nothing,
  but this loop goes on and on. What's wrong? Are there still some nasty details to configure/set?

I'd really appreaciate if you'd have the time to answer.
Thanx and bye!
chris
0
Comment
Question by:charlass
2 Comments
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 50 total points
ID: 2638451
I haven't actually used GUSI so this answer may be way off the mark, but what it sounds like is that somehow the Open Transport request has been given an infinite timeout. There undoubtedly is some way to abort the call, but it's probably easier to fix the place it's initially being called. I'd go through looking for any receive data calls whose timeouts are infinite (or some incredibly huge number). Particularly watch in headers for default arguments that are set to infinity, etc.

That's about all the help 50 points is worth anyway ;)
0
 
LVL 1

Author Comment

by:charlass
ID: 2639088
Yep, your guess is right. OT insistet on having still data but a call of recv() didn't deliver any bytes. Queer.
But two days later vanished the problem (without any reasonable reason...).
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question