Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

GUSI: close(socket) hangs

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
charlass
Asked:
charlass
1 Solution
 
Alex CuryloCommented:
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
 
charlassAuthor Commented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now