B
BMermuys
Hi,
If the server is run on Sun and the client can receive it with Pack=1, then
I suspect that structure alignment for the Sun compilation is 1 byte, not 4.
Dunno if it will help, but I don't think it's much work to see if Pack=4 for
the client helps when the server runs on Windows.
Greetings
Tamir Khason said:Simple Casting. This server using its own protocol over TCP to construct
structures and I'm on other side have the same structures to recieve
If the server is run on Sun and the client can receive it with Pack=1, then
I suspect that structure alignment for the Sun compilation is 1 byte, not 4.
Dunno if it will help, but I don't think it's much work to see if Pack=4 for
the client helps when the server runs on Windows.
Greetings
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
BMermuys said:Hi,
structTamir Khason said:Thank you for response.
1) The source server was Sun (not Linux)
2) no, the client is C# and I'm cast Object (created from Byte[]) to
Yes, but how is the server (c++) sending this struct ?
Server-side there should be a struct to byte conversion, how is it done ?
Simple casting or is each field send seperatly ?
Greetings
but3) No problem, it works with Sun server, but I think does not with Windows
server
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
Hi,
The problem is WHAT I'M passing in.
I revieve the stream from C++ server.
When it was in UNIX enviroment - everything worked ok, but once they
treanfer to Windows the problem begun. There are same structures,explanationas
far
as I understand , not the same stream - thet's the singlenotI
can
think about...
So, if you only see this problem when the server is on Windows and
onwindowsLinux, you can agree that the problem is with the server and not the
client.
Can't you post some code, how do you transmit this struct in c++, do you
cast the struct* to a byte* ?
I still don't quite understand what the problem is you're having if
PtrToStruct works.
HTH,
greetings
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
Anyway there is no way to provide full source it a lot of classes
with
relations etc.
The point is that there are diferences between unix and
TCPor
binary stream....
I do not believe that. The bytes can be read from the stream the same
way
you put them in.
The marshaller will take care that the byte order (big endian/little
endian)
in your struct's variables will be ok.
Remember that you have to pass the correct type to PtrToStruct,
otherwise
itt will output the wrong type.
--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk