Hi!
I've given a job to revive an old application a company had, but they don't have the server, just the client. While I was clear it was hard to do, I really want to give it a try.
So, my approach was emulate the functions the "server" had to do, and I thought it was going to be possible with CreateServer and AcceptTCPStream, but I've been able only to receive the data into my server, but anything I send back to the client is being ignored.
Every example I've found use WriteLine or WriteString, and it's not useful for me because I need to work at byte and word level. The funny part is ReadAvail always report 0, even when LData$ returns data.
I've coded something like this:
That part works, I get a sequence of data sent by the client, but after that I create a bank and then I fill it with some pokes (byte, word and float depending the size) and finally I send the data like this:
And nothing! It's just like the client isn't recognizing anything, in fact, Blitz3D seems to not sending anything (because the Client status doesn't change, the transmit meter don't move a pixel even if I use a WriteByte inside a 'Forever' loop)
Am I doing something wrong?
Thanks in advance!
I've given a job to revive an old application a company had, but they don't have the server, just the client. While I was clear it was hard to do, I really want to give it a try.
So, my approach was emulate the functions the "server" had to do, and I thought it was going to be possible with CreateServer and AcceptTCPStream, but I've been able only to receive the data into my server, but anything I send back to the client is being ignored.
Every example I've found use WriteLine or WriteString, and it's not useful for me because I need to work at byte and word level. The funny part is ReadAvail always report 0, even when LData$ returns data.
I've coded something like this:
svrLogin = CreateTCPServer(18000) strStreamLogin = AcceptTCPStream(svrLogin) <Repeat here> LData$ = Trim(Str(ReadShort(strStreamLogin))) <Repeat end>
That part works, I get a sequence of data sent by the client, but after that I create a bank and then I fill it with some pokes (byte, word and float depending the size) and finally I send the data like this:
PacketData = CreateBank(50) <some pokes here> WriteBytes PacketData,strStreamLogin,1,50
And nothing! It's just like the client isn't recognizing anything, in fact, Blitz3D seems to not sending anything (because the Client status doesn't change, the transmit meter don't move a pixel even if I use a WriteByte inside a 'Forever' loop)
Am I doing something wrong?
Thanks in advance!