clientSocket触发OnRead事件,ServerSocket触发OnClientRead(socket.ReceiveText)

解决方案 »

  1.   

    Text我用过
    我是说Stream怎么办?
      

  2.   

    比如ServerSocket:Socket.SendStream(m); 
    clientSocket:    socket.ReceiveBuf(buffer,socket.ReceiveLength);(OnClientRead事件)//自己定义buffer
      

  3.   

    I am trying...
      thx
      

  4.   

      Socket.ReceiveBuf(var buf;count integer);
      

  5.   

    不好意思,想请教一下
    TFileStream中的内容怎么写到文件中?
      

  6.   

    :joney1(不懂编程)
      会加分的
      

  7.   

    you can never recieve a stream by one time
    recieve even will be occur many times,you can write the code like this
    GetMem(Bytes,2000);
    I := Stream.Read(Bytes^,2000);
    if I = 0 then
    ClientSocket.Close
    else
    fsData.Write(Bytes^,I);
    FreeMem(Bytes);