Tuesday, September 23, 2003

Cars are shitters

Current music: Jets to Brazil - Perfecting Loneliness

Ok, so I have a few things to say here. I had to take my car in last night and they said it was not a warranty problem so it cost me $228 for 2 sets of pads and a rotor. Damn car. On top of that big kick in the nuts when I started walking the five minutes to the dealer it was sunny. By the time I got half way there I was running because it was thundering and pissing down.

Bowling was cool last night. Matt drove me there because I didn't have a car. It was only Matt, Jay, Dave, and me, but still pretty sweet.

So now I am at work. Didn't get here until 10:30, but its ok. I guess I won't be leaving until after 7 tonight. So some non-geek read about my geek troubles with wxWindows and UDP/Datagram sockets. Yesterday I finally figured out the problem after a week. Here is the solution (once again, non-geeks need to stop reading here unless you are JayzorBeard):

I put in some new accessors in many levels of the wxWindows code so that I could do setsockopt and change a socket from streamed (TCP) to unstreamed (UDP). Once those were in place I thought it should work, but it didn't. So I ported the changes I made in wxMSW to wxX11 and tried compiling my code in Linux. It worked fine and I could do broadcasts. So I had to figure out why Winsock wouldn't let this broadcast through. Finally I found this site which described how to use Winsock2 to do broadcasts. I realized they were using SOL_SOCKET as the 'level' parameter to the socket constructor. So I changed my ctor to use that instead of IPV4. Now I can do UDP/Datagram broadcasts in wxWindows through Winsock2. Exciting isn't it? Turns out that SOL_SOCKET makes it so that all flags are enabled I guess... Not really sure. Anyways it works.

No comments: