Results 1 to 2 of 2

Thread: Working with Buffer(n) As Bytes

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Garden Grove, CA, USA
    i've tried to use winsock over API codes and got it working, and when ever data is receive i will catch in Buffer(1000) as Bytes. the problem is that even though the data received did not fill up 1000 bytes the length of the encoded text is still 1000 bytes. How can i reduce it back to it's actual size? for example: "PING" to it's actual length as 23 characters?

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Are you using a dynamic array or not? If the array is fixed it will always contain 1000 items while as a dynamic array is resizable
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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