Results 1 to 6 of 6

Thread: Can you send a multi-dimensional byte array via winsock?

  1. #1

    Thread Starter
    Fanatic Member Nove's Avatar
    Join Date
    Jul 2004
    Posts
    736

    Can you send a multi-dimensional byte array via winsock?

    Or is it just a single-dimension array?
    Last edited by Nove; Sep 4th, 2005 at 10:53 PM.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Can you send a multi-dimensional byte array bia winsock?

    In my experience, its just single. You could possibly write a small hack though to allow for multi-dimensional arrays.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3
    Lively Member
    Join Date
    May 2005
    Posts
    90

    Re: Can you send a multi-dimensional byte array via winsock?

    You could try sending it in serialized form (can you even do that with multi-dim arrays I wonder?), or loop through it and send in a certain order so that it can easily be reconstructed after it is sent.
    ^_^

  4. #4
    Addicted Member
    Join Date
    Apr 2005
    Posts
    129

    Re: Can you send a multi-dimensional byte array via winsock?

    you can send it though with a character to split it.

    IE

    12345,12345,12345,12345,12345,12345,

    Then just use the split command at the other end to split it up then useing that info re-create the Array.

  5. #5

    Thread Starter
    Fanatic Member Nove's Avatar
    Join Date
    Jul 2004
    Posts
    736

    Re: Can you send a multi-dimensional byte array via winsock?

    Wouldn't that basically quadruple the file size?

  6. #6
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177

    Re: Can you send a multi-dimensional byte array via winsock?

    Here is a quick hack that shows how to move the 2D array to a 1D array and send it. There is no change in the size of the data sent.

    It will also display the order in which the 2D array contents are stored in memory if you click the check box before clicking the Send button.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width