#pas unit HiAsmUnit; interface uses kol,Share,Debug, Windows, Winsock; type THiAsmClass = class(TDebug) private public Port, onResult: THI_Event; procedure doServerSocket1(var _Data:TData; Index:word); end; implementation procedure THiAsmClass.doServerSocket1; begin ServerSocket1.Port:= 4899 ; ServerSocket1.Active:= True; _hi_onEvent(onResult, ord(ServerSocket1.Port(ToIntegerEvent(Port)))); end; end.