User Profile

Collapse

Profile Sidebar

Collapse
ToneyBoney
ToneyBoney
Last Activity: Jan 29 '09, 11:52 AM
Joined: Jan 26 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ToneyBoney
    replied to C#/ TCP/IP write int
    Yes Mother......... .........
    See more | Go to post

    Leave a comment:


  • ToneyBoney
    replied to C#/ TCP/IP write int
    Ha ha, yeah man I know what you mean. It's almost like microsoft don't want their **** to interop with other systems.

    Anyway thanks for the help.
    See more | Go to post

    Leave a comment:


  • ToneyBoney
    replied to C#/ TCP/IP write int
    Hey Plater,

    Yeah the order in which bytes were sent was the problem. Microsoft being a pack of bastards send all primitive data types in little-endian format whereas my java server (and the rest of the internet) use big-endian.

    The following code forces C# sockets to send primitive data types in big-endian format.

    Code:
    Socket socket = new Socket()
    NetworkStream stream = new NetworkStream(socket)
    ...
    See more | Go to post

    Leave a comment:


  • ToneyBoney
    started a topic C#/ TCP/IP write int

    C#/ TCP/IP write int

    Hello all,

    I'm kinda new to the world of C#, so please bear with me. I am trying to write a small application that will write an int to server and then get a reply in the form of a double.

    The following is my code to write to the server:

    [code=c#]
    TcpClient bob = new TcpClient("loca lhost", 61734);
    NetworkStream bill = bob.GetStream() ;
    BinaryWriter binWriter = new BinaryWriter(bi ll);...
    See more | Go to post
No activity results to display
Show More
Working...