@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6



Comments:

<0> when i tried to send the UDT as is
<1> notnot sure
<0> it said: only UDTs in public obj mods can be coerced to or from a variant or p***ed to late bound functions
<0> does that mean i gotta define the UDT as public or something?
<0> hehe
<1> it doesn't accept a type
<1> it accepts a constant
<1> like vbByte
<1> so I don't think you're gonna do it that way
<0> so u gotta basically call the send sub twice
<0> first with the byte
<0> then with the long?
<1> or send the udt
<1> see if it comes through as 5 bytes
<1> and just getdata it as a byte and then a long
<1> due to packing, the udt may not show up at 5 bytes though



<0> its all gotta be seperate
<0> Call Winsock1.SendData(h.msgtype)
<0> Call Winsock1.SendData(h.size)
<0> Call Winsock1.GetData(h.msgtype, , 1)
<0> Call Winsock1.GetData(h.size, , 4)
<0> this also works: Call Winsock1.GetData(h.msgtype, vbByte, 1)
<0> Call Winsock1.GetData(h.size, vbLong, 4)
<1> Winsock1.GetData(h.size, vbLong)
<1> should be enough
<0> k
<1> same with byte
<1> it knows a byte is 1, and a long is 4
<0> what happens if you call winsock1.getdata(S,,2048)
<1> so if type = 1 was a players name, youd know it was a string
<1> with type = 2 was a players age youd know it was an integer
<0> will it only return when its recieved 2048 bytes?
<1> if type = 3 was an avatar you'd know it was an image
<1> no I think thats a max
<0> or will it return with whatevers in the buffer only?
<0> ok.
<1> I think if you had 3000 bytes, youd only get 2048 of em
<0> yeah.
<0> cool man.
<1> if yer lucky, when I get home I'll dig out a project where i used it
<0> i'll implement that some time. the way i've always done it is a bit crapper than that.
<0> i send all messages saying "BUFSTART" & msg & "BUFEND"
<0> then wait till i have the 2 end points hehe.
<2> [[ and ]] might be easier
<2> easier to look at, too
<0> yeah.
<0> doh: eh, no worries.
<2> ***uming, of course, the content of the 'packet' will never have [[ or ]] in it
<0> i like the "CSocket" vb cl***.
<0> http://www.vbip.com/winsock-api/csocket-cl***/csocket-cl***-01.asp (if any1s interested)
<0> i've had lots of issues from winsock. also its nice not needing an OCX, and not needing to spawn stuff in a control array if u need multiple sockets.
<3> if you're looking for delimiters and safety, i'd go with a single char delimiter and escape them in the message. 00 byte comes to mind
<1> http://www.nomorepasting.com/paste.php?pasteID=66171
<0> Teycho: yeah.
<3> it's simple and fault tolerant as long as you can appropriately ignore the escaped ones (merely escaped with further 00's
<3> otherwise if i saw BUFSTART and BUFEND in the data stream, i might try injecting that sort of thing into the user intput to manipulate the protocol
<0> ah
<0> if ur a haxxor :p
<0> i dunno what u mean by "escape them in the message"
<3> nah, i'm just a misfit toy
<1> \ is an escape character in SQL
<3> well it'd work just like strings
<1> but sometimes you NEED an \
<1> so you put \\ where you need an \
<1> suppose you wrote a chat app
<1> and someone typed in the chatroom "hehe type BUFFEND"
<3> \ is useful if you're going to have special meanings for things like \n and \t
<1> and your app sent that
<1> what'd happen?
<3> otherwise, merely using your delimiter as your escape char is the most efficient
<1> BUFEND rather
<1> anywho
<1> I pasted example code
<3> sending the data lengths instead of using delimiters avoids the problem altogether
<0> yeah.
<3> it's also faster to process. less human readible sometimes, but at least you're not constantly inspecting the message for protocol information
<0> unless someone ****s with the header :p



<3> hell, you might even finish each message with a checksum
<1> yeh thats a downside
<1> you send the wrong size by accident, you app waits for 2 gigs of data to arrive :
<1> :p
<3> the first line of defense is the available user data that they can edit and "taint"
<0> yeah
<0> yeah.
<3> Doh_: http has worked like that for years :)
<0> encrytzor the whole mother****er! :p
<2> "taint"
<0> how hard is it to emulate a web browser?
<0> in terms of logging into a secure site, posting forms etc?
<3> depends on what you mean
<3> mmm, not hard
<0> yeah?
<0> its probably public key encryption and private key.
<1> depends on the libraries you use
<3> could be time consuming but not hard really
<1> raw SSL communication is prolly a bitch
<3> you mean ssl?
<3> yeah, i'd not want to implement that myself
<0> u think there would be VB libs?
<1> libraries, yes
<0> prob dlls?
<1> VB libraries? well wtf is that?
<3> libeay.dll
<0> libeay liberati!
<3> libeay32.dll rather
<1> theyre prolly obfuscated and difficult to use too :p
<3> liberati tute me ex inferno
<1> crypto stuff tends to be odd
<0> eh, much easier to just p*** **** in and out of a DLL than implement ur own SSL
<3> xmlhttp components handle all that noise for you
<0> who here codes in VB2k5?
<0> Two-Bits: what components r those?
<0> (what type)
<3> msxml2.xmlhttp or something like that. activex object
<0> i kind of feel like at this point, if MS are gonna abandon VB. and i'm gonna need to learn a new language, it might aswell be c++ on a linux platform.
<4> no way
<1> weirdo
<3> Lope: or .net
<1> 'if theyre not gonna sell fritos anymore, I might as well start my own cabbage farm!"
<0> haha
<3> alright look buddy, you dont NEED a reason to start a cabbage farm. that **** has it's own rewards!
<0> well, linux has many advantages that windows doesnt have.
<1> yes, like, no pesky users to ask you questions
<3> Lope: from a developer's standpoint, i disagree
<1> and no need for tech support, cuz no ones gonna be using your app
<4> .NET is an advantage. When it doesn't have that, I'd also note it has a disadvantage.
<4> (among others)
<1> plus, there are .net ports for linux :p
<3> everything's a mixed bag
<4> tried any?
<1> no
<1> I avoid linux
<0> doh: that is changing
<0> linux is goining popularity
<1> mm hmm
<0> a user friendly version could easily be released.
<4> Lope, people were saying that in the early 90's...
<3> 80% of the applications i use on a regular basis i'd likely have to do without on a linux box.
<1> and it will continue to do so, until it hits MAYBE apples numbers
<3> so.. no linux for me
<1> and linux's growth in the home sector is TINY compared to growth in the server market
<3> Lope: yes, but by that same factor, linux's user base is becoming more and more stupid
<1> and the server market growth isn't spectacular anyways
<0> Two-Bits: haha, well, thats true. but windows users have never been intelligent
<1> omg j00 try monkeyfarlinux.219.932.34.2.354..23.5.555beta 2?!?!


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #vb
or
Go to some related logs:

anaconda_t is not authorized to change the password
#chat-world
#kl
#asp
#chat-world
#allnitecafe
richard stallman sucks
study in Malaisya
#kl
#photoshop



Home  |  disclaimer  |  contact  |  submit quotes