Basically i want to be able to get a 32bit int and attach its binary to the binary of a string. E.g. (IM going to use 8bit instead of 32bit) i want 255 + hi 11111111 + 0110100001101001 = 111111110110100001101001 So the int holds its binary value,i dont care how it comes out i just want it to be able to send the data over a socket.
(This is all over websockets and the new sec-websocket-key's to stop hacking, if anyone just knows how to do the websocket handshake that would be just as nice)
Thankyou ! I have been trying on this for days and im not one to come to this type of website to get the answer
EDIT
Ive been ask to give more info so her is the full deal. I have connected to the user of a stream port, he has sent me headers now i need to reply to to complete the connection. The import data is
Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5"Random string following rules"(i will call this sk1)
Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 "Random string following rules"(i will call this sk2)
^n:ds[4U "Random string following rules"(i will call this sk3)
1) int1 = compress the numbers into sk1 and divid them by the amount of spaces in sk1
2) int2 = compress the numbers into sk2 and divid them by the amount of spaces in sk2
3) fullapend = Add append the bytes of int2 to int1 then append the bytes in sk3
4) Finally MD5 digest fullapend
5) Send the final result to the host along with some other headers and if they match up the connection holds open
That is everything that needs to happen and i have not got a clue how to do it
Finished !
Well basic both answers was right and i would like to apologise if i seemed a bit rude, i didnt know the \x was a (something) meaning binary. but that worked a treat. Once i have the finished function to connect send etc... i will post it on here and else where for anyone else thats stuck, again thankyou !