• Welcome to Valhalla Legends Archive.
 

Socks & Codewarrior for OSX

Started by NetNX, January 13, 2005, 09:33 AM

Previous topic - Next topic

Mephisto


NetNX

Quote from: Banana fanna fo fanna on January 17, 2005, 09:05 AM
NetNX: http://developer.apple.com/documentation/Porting/Conceptual/win32porting/Articles/networking.html

BUT: that code you posted in VB is terrible (sry). Too many gotos; go read online about how you should really structure your code, and buy a book. You should really learn basic programming concepts and techniques before delving into a larger project.

Mephisto: you're a friggin retard, and to cover it up you decided to use the word "aloof"


Wasn't trying to show off.. i was mearly trying to prove a point that i can infact conjurgate(sp?) my own programs and write them i know that goto's are inefficant i wrote that code late at night and without thinking too much i could fix it but im not using it anymore. This program is just unrelated to the whole bot programing thing because when you post u know "bots" source code people are all like  you stole from so and so blah bla blah just cuz u can copy something done already dosent make you a programer... get what im saying here?

Grok

Quote from: NetNX on January 15, 2005, 09:50 AM

Private Sub sckAccept_DataArrival(Index As Integer, ByVal bytesTotal As Long)
........
End Sub


eh... my code gota love them bd servers... im just trying to figure out the whole C++ thing in general.... and socks is where id like to start...

IMHO, your DataArrival event procedure should be no more than about 3 lines of code, plus error handling.  Think about what DataArrival event is all about, data arriving.  When it arrives, your immediate job is to receive it, and then call something to take action on it.  So in the arrival procedure, just do that.  Receive it into whatever buffer setup you have, then call/notify another procedure to take action on the new data.

Structuring as suggested will keep your procedures clean, readable, maintanable, and make you a better programmer.  But like I say, just a suggestion, and my own opinion and preference.

NetNX

Yea.. I understand that, But its good advice :)