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


Sign in to follow this  


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  


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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!