Advertisement

TCP/IP differences on Windows 2k and 9x/Me?

Started by May 24, 2001 06:32 PM
4 comments, last by Nedelman 23 years, 8 months ago
I wrote a program that runs over a network and transmits audio in real time to other computers. The program runs great on Windows 2k, but there are some interesting problems with it on Win9x/Me that I can''t resolve. Without getting too deep into details, I feel like I''ve traced the problem down to recv() on the Win9x/Me machines. But I could be wrong. Does anybody know about technical differences between TCP/IP implementations that I should know about? Or maybe point me to some sources? Thanks ahead of time. -Derek
www.gameprojects.com - Share Your Games and Other Projects
There are lots of small differences between 2k and 9x.

First off, you''re checking return values from the api calls for errors, right?

recv() just isn''t being called? Blocking or non-blocking?

Is a call to WSAEventSelect() failing (or WSAAsyncSelect())?

Making a program that transmits compressed audio in realtime to other computers is something I''m definately familiar with

Check all possible errors, and you should be able to figure out which api call is failing, and *why* it works in 2k, but not 9x.
There''s not much else I can say, based on the info I have so far.

--Rob
Advertisement
Would you happen to be broadcasting the data stream (simple broadcasting - not multicast)?

If that isn''t the case you need to provide more information on the kind of problem you are experiencing. Just saying I have a problem, I''ve narrowed it down to xxx, help me - doesn''t really provide enough information. Are you losing data, connections etc.

What version of Windows 9x are you using? Winsock 2 was not really incorporated into Windows 95 until OSR2 and there were NUMEROUS TCP/IP stack fixes on 95.

Next, it depends on what receive method you are using as well. Async via overlapped I/O, blocking, etc. I know you aren''t using Completion Ports because Win9x doesn''t support them

Let us know,



Dire Wolf
www.digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
I was really just looking for any "hot spots" anybody might know of, but to get specific...

The program works like this: As you speak into a microphone the audio is captured into small buffers. These small buffers are sent synchronously to all the connected clients (no more than 2). Meanwhile, the connected clients are recv()ing the incoming sound data as their play buffers empty out. In other words, when a play buffer is empty, I keep doing recv() until I get enough data to fill the buffer.

I hope the explanation makes sense.

Also, I''m not much of an expert on writing these types of programs (realtime audio over a network) so if you have any suggestions as to how to make this program better, I''d be interested to know.

Also, Windows 98 seems to lose connections to other computers, which sucks.

And Windows 2000 seems to run this program just fine.

Thanks again
That last message was mine.

-Derek

www.gameprojects.com - Share Your Games and Other Projects
I ran into a problem once where I was retrieving more data from recv() than I had room for in the buffer that was passed to it. The memory that held the value of the socket descriptor I was doing recv calls on was getting overwritten. I couldn''t for the life of me figure it out until I noticed the size of my buffer and how much I was trying to stuff into it So on the next call to recv() I''d get an invalid socket error. The socket number was change from 240 to 101 (memory was being overwritten by the call to recv()). Once I fixed my buffer allocation everything was fine. I''m not sure why this would work on Windows 2000 and not on Windows 9x.

Does the connection always disconnect or is it random? When it disconnects, what error message are you getting back?



Dire Wolf
www.digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com

This topic is closed to new replies.

Advertisement