[Modulo] Sockets Async 1.3b (21/06/2016)
#20
Just wanna say... Even if this is Spanish forum bc this is the only place where I found this modul!

(This occurred as a UDP Server, Clients were tested from C# and PHP and got the same result just the make sure it's not some language converting differences)
If you pass hex(0x00-0x7f) int(0-127) to the server there's no problem,
but after that it get messy... If I convert it to int I'll get negative numbers as int as just gibberish from hex,
but if I convert it as string it work file and represent the correct char that it responsible for the int in ascii.

example: hex(0xef) - dec(239) - ascii(ï) | array content that will be sent to UDP SOCKET: {0xef, 0xef, 0xef}
as a string - "%s" : print just fine that "ïïï" and it's correct
ERRORS:
as a hex - "0x%06x" / "0x%02x" : print received data[] any index 0-3 is return "0xffffffef"
as an integer - "%i" : print the received data[] any index 0-3 is return "-17" and "0" above

if you try to copy any index 0-3 into a 'new temp[1]' and try to print "0x%02x" will return "0x00"
if you try to copy any index 0-3 into a 'new temp[2]' and try to print "0x%02x" will return "0xffffffef"

if you just use any number below dec(127) hex(7f) then it's work fine...

I don't know if this my stupidity or it's amxxpawn falt or what whatever caused it, but I did programed sockets in C# and I don't remember issues like that... I try to just receive the data and just send it back without any converting, and decoding it did give the expected result, so maybe it's an amxxpawn thing.

I spent like 3 hours with debuging this after I realized that not me fricking it up...
Ragestart

If anyone know a solution for that, our just can point out my mistake I would be thankful!
Responder


Mensajes en este tema
RE: [Modulo] Sockets Async 1.0Beta - por totopizza - 14/06/2015, 04:58 PM
RE: [Modulo] Sockets Async 1.0Beta - por Luchito - 14/06/2015, 05:08 PM
RE: [Modulo] Sockets Async 1.3b (21/06/2016) - por kovakovi2000 - 11/02/2022, 11:10 PM

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)