다음과 같이 Blocking 방식으로 Socket서버를 만들고 있는데
Thread생성시 SocketStream을 인식하지 못합니다.
Thread에 대한 ClientExecute procedure를 override하는 것은 알고 있습니다.
뭐가 잘못 된건가요?
procedure TForm1.ServerSocket1GetThread(Sender: TObject;
ClientSocket: TServerClientWinSocket;
var SocketThread: TServerClientThread);
var
SocketStream:TWinSocketStream;
begin
SocketStream:=TWinSocketStream.Create(ClientSocket,20);
SocketThread:=TMyServerClientThread.Create(True,ClientSocket);
(SocketThread as TMyServerClientThread).SocketStream:=SocketStream;
^
|
|
SocketThread.FreeOnTerminate:=True;
SocketThread.Resume;
end;
부탁드립니다.