Link to home
Start Free TrialLog in
Avatar of charlass
charlass

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Alex Curylo
Alex Curylo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of charlass
charlass

ASKER

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...).