Networking ReadInt()
BlitzMax Forums/BlitzMax Programming/Networking ReadInt()
| ||
The documentation reads: Method ReadInt() Returns: The read value Description: Read an int (four bytes) from the stream Information: If a value could not be read (possibly due to end of file), a TStreamReadException is thrown. ____ If (SocketReadAvail(socket) >= 4) Then ________ intPacket = ReadInt(stream) ____ End If Does this still apply if the application is run from a 64bit system? Should I be using SizeOf(int) ? What if I have a C++ Winsock host running on a 64bit system, sending a 8bit integer? What will happen to my client on a 32bit system? Some clarification would be awesome! Thanks in advance. |
| ||
I'm not sure what C++ would use, but data types in Max are always the same, regardless of processor architecture. |
| ||
ok, that clears a bunch up. Last thing to find out is if I should be checking the socketstream for 4 bytes or 8 bytes. |
| ||
bm builds no 64bit as such there is no problem, it will always be 32bit |
| ||
BlitzMax ints are 32 bits, longs 64 and shorts 16. |