不清楚,你这样试试.
var
newCount, OldCount: Integer;
begin
NewCount := 发送的字节数. //得到send buffer size:
getsockopt(ClientSocket1.Socket.Sockethandle, SOL_SOCKET, SO_SNDBUF,PChar(@OldCount),SizeOf(OldCount)); //设置新的send buffer
setsockopt(ClientSocket1.Socket.Sockethandle, SOL_SOCKET, SO_SNDBUF,PChar(@Count),SizeOf(Count)); socketstream.write(...);
//调置回来
setsockopt(ClientSocket1.Socket.Sockethandle, SOL_SOCKET, SO_SNDBUF,PChar(@OldCount),SizeOf(OldCount));end;
var
newCount, OldCount: Integer;
begin
NewCount := 发送的字节数. //得到send buffer size:
getsockopt(ClientSocket1.Socket.Sockethandle, SOL_SOCKET, SO_SNDBUF,PChar(@OldCount),SizeOf(OldCount)); //设置新的send buffer
setsockopt(ClientSocket1.Socket.Sockethandle, SOL_SOCKET, SO_SNDBUF,PChar(@Count),SizeOf(Count)); socketstream.write(...);
//调置回来
setsockopt(ClientSocket1.Socket.Sockethandle, SOL_SOCKET, SO_SNDBUF,PChar(@OldCount),SizeOf(OldCount));end;
setsockopt(ClientSocket1.Socket.Sockethandle, SOL_SOCKET, SO_SNDBUF,PChar(@NewCount),SizeOf(NewCount));