Solved

GUSI: close(socket) hangs

Posted on 2000-03-07
2
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

628 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