Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    32
  • comments
    30
  • views
    10943

Ugh.

Sign in to follow this  
Lacutis

151 views

Ok, I only spent an hour working on it tonight. However I did find the wierd bug I was talking about before and it had to do with the way that I handle the input buffer from the socket.

I have two buffers, one is the "input" buffer, and I use it to do a recv from the socket. The second buffer is used in a for loop. I loop from 0 to the length of the recv buffer and add characters one at a time to the processing buffer. When I get 4 bytes I check what ComType the message is. I then keep looping until the processing buffer has the same amount of bytes as whatever com object the message is. I then cast the buffer to the proper type and pass it to the scripting engine to handle.

The bug was I was checking the recv buffer for the comtype and not the processing buffer, so when I got multiple messages in one recv, it was treating all of them as the first message type. But it's fixed now and works happily.

When I left last night I ended up being out till after 1 am, I fell asleep around 2 am. I got up at 6:30 am for work, so I'm beat.

I haven't watched tv in a week and a half so I am going to go fire up the tivo and watch the new episode of stargate and atlantis I missed on friday. Then I'm going to sleep.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!