Salve,

avrei bisogno di modificare la seguente funzione in modo che non ritorni std::string ma char*

codice:
std::string Socket::ReceiveBytes() {
  std::string ret;
  char buf[1024];
 
  while (1) {
    u_long arg = 0;
    if (ioctlsocket(s_, FIONREAD, &arg) != 0)
      break;

    if (arg == 0)
      break;

    if (arg > 1024) arg = 1024;

    int rv = recv (s_, buf, arg, 0);
    if (rv <= 0) break;

    std::string t;

    t.assign (buf, rv);
    ret += t;
  }
 
  return ret;
}
vorrei che il prototipo di funzione fosse così:

bool Socket::ReceiveBytes(char * buffer, const int buffeSize)
così posso scegliere quanto leggere...

grazie