Results 1 to 2 of 2

Thread: Working with Buffer(n) As Bytes

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Garden Grove, CA, USA
    Posts
    110
    hello,
    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 :irc.webmaster.com" to it's actual length as 23 characters?
    ngphuocthinh

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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
    Use
    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