| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 82,959
» Latest member: bakso108
» Forum threads: 2,408
» Forum posts: 11,315
Full Statistics
|
| Online Users |
There are currently 346 online users. » 2 Member(s) | 340 Guest(s) Applebot, Bing, Google, Internet Archive, bakso108, o88casino
|
| Latest Threads |
IW 16.2.0 Missing librari...
Forum: IntraWeb General Discussion
Last Post: Gregory_Twedt
06-24-2026, 04:40 AM
» Replies: 5
» Views: 697
|
VCL conversion
Forum: Delphi General Discussion
Last Post: tobenschain
06-20-2026, 05:00 AM
» Replies: 0
» Views: 102
|
TIWjQDBGrid changing UI
Forum: IntraWeb General Discussion
Last Post: BoostedCruiser
06-08-2026, 02:02 AM
» Replies: 36
» Views: 70,564
|
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: Fabrizio Conti
06-04-2026, 09:14 AM
» Replies: 3
» Views: 524
|
Access Violation When Val...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
06-03-2026, 08:47 AM
» Replies: 2
» Views: 541
|
Bootstrap5
Forum: IntraWeb General Discussion
Last Post: geraldtatum
06-02-2026, 06:24 AM
» Replies: 1
» Views: 440
|
weakpackageunit contains ...
Forum: IntraWeb General Discussion
Last Post: rlebeau
05-26-2026, 04:56 PM
» Replies: 4
» Views: 591
|
Custom 404 handler
Forum: IntraWeb General Discussion
Last Post: CfawesDwale
05-21-2026, 08:02 AM
» Replies: 0
» Views: 277
|
PopUp Menu
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
05-13-2026, 04:35 AM
» Replies: 4
» Views: 8,242
|
Image question on tiwjqdb...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
05-13-2026, 03:32 AM
» Replies: 3
» Views: 4,148
|
|
|
| Get size of TIdMessage without first saving to TStream |
|
Posted by: edwinyzh - 11-13-2018, 03:51 AM - Forum: Indy
- Replies (2)
|
 |
Hello,
We all know we can get the size of a TidMessage instance by first saving it to a TMemoryStream and read TMemoryStream.Size to get the size of the email message in bytes, but this doesn't sound performance-friend.
Is there an alternative way to get the size of a Tidmessage object?
Thanks.
|
|
|
| Problem opening a link in v15.0.14 and v15.0.15 |
|
Posted by: ioan - 11-12-2018, 09:59 PM - Forum: IntraWeb General Discussion
- Replies (6)
|
 |
Starting with version .14, the following link breaks something in the IW application if is compiled with http.sys:
Code: http://server/?level=sslfaxv3&id=f1mFiOlnZy00Tu8%2FpUHJ%2FpTuZFJF2rbBrOG6K8WrMWEYNhFYpwCEJE2u2r46E%2FSujZc%2Bd%2FdEqf%2BYV%2F3qhw%3D%3D
Up to version .13 it works fine, but starting with version .14, the application doesn't ever get inside TIWServerController.IWServerControllerBaseGetMainForm when clicking that link. It seems that the problem is with the value of the "id" query field. If I change the value to id=aaaaaaa, or any simple string, it works fine. As I said, this above link works fine in version .13.
The value of the "id" is created by using TNetEncoding.URL.Encode(...) on a long string.
|
|
|
| IdUDPServer issue |
|
Posted by: BartKindt - 11-12-2018, 07:03 PM - Forum: Indy
- Replies (1)
|
 |
I use an IdUDPServer to open multiple Ports like this:
Code: IdUDPServer1.Active := false;
Socket1 := IdUDPServer1.Bindings.Add;
Socket1.IPVersion := Id_IPv4;
Socket1.IP := HyteraSettings.TCPLocalIP;
Socket1.Port := HyteraSettings.RRSPort; // RRS PORT
if HyteraSettings.Debug then LocalLog('UDPServer Bindings.Add: '+HyteraSettings.TCPLocalIP+' Port '+IntToStr(HyteraSettings.GPSPort));
Socket1 := IdUDPServer1.Bindings.Add;
Socket1.IPVersion := Id_IPv4;
Socket1.IP := HyteraSettings.TCPLocalIP;
Socket1.Port := HyteraSettings.GPSPort; // GPS PORT
Then I set Active to TRUE.
Afterwards I got an exception caused by the other side: , UDPServer Exception: Socket Error # 10054Connection reset by peer.
I then call IdUDPServer1.Active := false; and I completely FreeAndNil it.
Then the loop starts again from fresh, with a newly created UDPServer.
However, now I get the Exception: Could not bind socket. Address and port are already in use
Why does this happen? Should I somehow manually clear the sockets before setting the Active to False?
Bart
|
|
|
| Centralized session management |
|
Posted by: mhammady - 11-12-2018, 06:38 PM - Forum: IntraWeb General Discussion
- Replies (3)
|
 |
Hello,
Is there is a way in IW to setup a cluster that when a session is opennedcan be used by any server in the IW cluster?
The main reason behind this question is the complexity behind setting up a load balancer with sticky sessions.
I'm using IW 14.2.7 with D XE5 as ISAPI
Thank you
Mohamed
|
|
|
| Fast forward audio with IWAudio Component |
|
Posted by: rflopes3 - 11-12-2018, 02:23 PM - Forum: IntraWeb General Discussion
- Replies (11)
|
 |
Hello guys.
What should I make to be able to fast forward audio or video files using intraweb ? I'm using Central Guest components as well with the same behavior. O ask them and they told me that it's a server feature called "206 partial content" that is not been generated by the server to the browser.
How can I configure this on intraweb ?
|
|
|
| IWAudio nao posso avancar o audio |
|
Posted by: rflopes3 - 11-12-2018, 02:20 PM - Forum: IntraWeb Dúvidas Gerais
- Replies (3)
|
 |
Pessoal
Alguém sabe como faço para avançar um arquivo de audio que estou tocando pelo componente IWAudio ? Hoje ele começa tocar mas se eu clico no meio da linha do tempo para avançar ate aquele ponto ele simplesmente ignora meu clique. Na segunda vez ele vai pq ja está em cache.
Me disseram que está faltando um "206 Partial content". Alguém sabe como configurar isso no intraweb ?
|
|
|
| How To Write a JavaScript Event? |
|
Posted by: ShaneStump - 11-11-2018, 09:31 PM - Forum: IntraWeb General Discussion
- Replies (4)
|
 |
Howdy All!
I am trying to hook to a bootstrap region OnScroll event and then have it fired back to a C Builder OnEvent to let me know if the use has scrolled to the bottom of the window.
The problem is that I am obviously not calculating the scroll position with the right object in my javascript event. My question is how do I in a generic OnEvent() in javascript reference the object that the event is executed for (i.e. like the Delphi Sender object)?
Here is what I have:
1) In my form's OnCreate() event, I have the following code:
// this is the JavaScript function that we want to call.
// This function, in turn, will call IWForm2.DoMyAjaxFunc()
TStringList * pJS = new TStringList;
pJS->Add(L"function OnWindowScroll()");
pJS->Add(L"{");
pJS->Add(L" var myData;");
pJS->Add(L" if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight - 20)");
pJS->Add(L" {");
pJS->Add(L" myData = 'eof = true';");
pJS->Add(L" }");
pJS->Add(L" else");
pJS->Add(L" {");
pJS->Add(L" myData = 'eof = false';");
pJS->Add(L" }");
pJS->Add(L"executeAjaxEvent(\"&data=\"+myData, null,\"" + UpperCase(Name) + L".OnWindowScroll\", false, null, false);");
pJS->Add(L"return true;}");
PageContext->ExtraHeader->Add ( UnicodeString().sprintf ( L"<script language=\"javascript\" type=\"text/javascript\">%s</script>",
pJS->Text.c_str()
)
);
// If we want to call IWForm2.DoMyAjaxFunc, then we have to register it as a Callback
WebApplication->RegisterCallBack(UpperCase(Name) + L".OnWindowScroll",OnWindowScroll);
2) In a button OnAsyncClick event, I attach the above event to the region that I want to check the scrolling of:
// Create dialog
pTermsAndConditionsFrame_ = new TTermsAndConditionsDialogFrame(this);
pTermsAndConditionsFrame_->Name = L"TermsAndConditionsDialogFrame" + IntToStr((int) GetTickCount());
// Hook region's onscroll event...
pTermsAndConditionsFrame_->ModalBodyRegion_->ScriptEvents->HookEvent(L"onscroll",L"OnWindowScroll();");
pTermsAndConditionsFrame_->Parent = this;
3) The registered OnWindowScroll() is always called.
Thanks in advance,
Shane
|
|
|
| TidSmtpServer Stops responding |
|
Posted by: bluewwol - 11-09-2018, 02:36 PM - Forum: Indy
- Replies (4)
|
 |
Hi,
I have TidSmtpServer setup and running, it runs fine for a period of time, then stops responding. When I set the server active := True it creates 2 threads for each IP binding I have made. Each of these IP's do for a period of time handle incomming requests as expected. Then slowly each IP stops responding to external requests and the 2 threads created when the server was set to active appear to terminate.
The bindings all are still set, and restarting to server (Active set to False then True) does not solve the problem.
I presume that since it is the Listener Threads that are failing we should expect to see the onListenException be fired when that occurs, however I never see this get called.
Code: procedure TdSmtpServ.WwolSmtpServListenException(AThread: TIdListenerThread; AException: Exception);
begin
Log(now, 0, -9, AThread.Binding.IP, AThread.Binding.PeerIP, AException.ClassName, '[' + IntToStr(TmySmtpItem(AThread.Data).Id) + '] - ' +
AException.message + ' - WwolSmtpServListenException');
TmySmtpItem(AThread.Data).LastEvent := 'WwolSmtpServListenException ' + AException.ClassName + ' - ' + AException.message;
end;
My bindings are created as follows
Code: procedure TdSmtpServ.SetBoundIp(ServerId: integer);
var
Query : TMyQuery;
zConn1 : TMyConnection;
myBinding : TIdSocketHandle;
begin
Query := TMyQuery.Create(nil);
zConn1 := TMyConnection.Create(nil);
try
try
dmMain.SetDBReadcomp(zConn1, Query, 'SetBoundIp');
if not zConn1.connected then
dmMain.ConnectToDB(zConn1, 'SetBoundIp');
with Query do
begin
SQL.Text := 'SELECT idIPmanager, InternalIP, PublicIP, ReverseDnsName, ServerId, Active ' + ' FROM ipmanager ' + ' WHERE Active = True and ServerId = ' + IntToStr(ServerId)
+ ';';
Open;
First;
while not Eof do
begin
myBinding := WwolSmtpServ.Bindings.Add;
myBinding.Port := 25;
myBinding.IP := Query.FieldByName('InternalIP').AsString;
myBinding.DisplayName := Query.FieldByName('ReverseDnsName').AsString;
Next;
end;
end;
except
on E: Exception do
begin
Log(now, 0, -1, 'SetBoundIp', myBinding.IP, E.ClassName, E.message + ' - ' + ' SetBoundIp');
end;
end;
finally
Query.Free;
zConn1.Disconnect;
zConn1.Free;
end;
end;
And myver config is set as follows
Code: with WwolSmtpServ do
begin
ReuseSocket := rsOSDependent;
AllowPipelining := True;
ServerName := 'WWOL SMTP server';
DefaultPort := 25;
ListenQueue := 50;
MaxConnections := 0;
MaxMsgSize := 0;
UseNagle := True;
UseTLS := utNoTLSSupport;
Intercept := nil;
IOHandler := nil;
end;
Any pointers on where to look would be most welcome
-Allen
|
|
|
| Need to time arrival of TCP socket data, how? |
|
Posted by: BosseB - 11-09-2018, 11:28 AM - Forum: Indy
- Replies (4)
|
 |
I am troubleshooting a WiFi UART<=>TCP socket bridge device and I need to verify the arrival times of packets sent via the UART input to the device at the TCP client end.
So in this case I will be sending packets of data via the serial link to the device starting at exactly 1 s intervals.
The packets are rather short, basically date/time strings in pure ASCII like "20181109" and "13:46:17"
My test strings start with STX and end with ETX bytes (0x02 and 0x03 respectively).
Each second the date and time packets are sent back-to-back and then nothing until the next second.
Speed is 38400 baud.
I am using FreePascal 3.0.4 and Lazarus 1.8.0 with the indylaz package installed on a Windows 7 x64 laptop.
Since the data arrive at times the client does not control and indy is blocking I have trouble implementing this checking utility...
What I need is:
- Connect the TIdTCPClient object to the bridge device on port 2101 (this is not a problem)
- Somehow start listening for incoming data
- When a packet has arrived transfer it to the main application for timing and logging purposes.
Probably this needs some kind of thread or a loop with Application.Processmessages, but I am not sure how to approach this...
Any advice available?
I have already implemented a configuration utility for the same WiFi bridge device using Indy, but that only had to deal with handshakes with a command sent from the client and a response being sent back almost instantly.
These commands are not started with STX but ended with ETX.
So this is implemented as follows (excerpt from config utility code), hopefully I could re-use some of that code:
Code: implementation
const
STX = 2;
ETX = 3;
constructor TConfigCommHandler.Create;
begin
FComm := TIdTCPClient.Create(NIL);
FComm.IPVersion := Id_IPv4;
FComm.ReadTimeout := 5000;
FComm.ConnectTimeout := 5000;
FTcpConnected := false;
FComm.OnConnected := OnConnected;
FComm.OnDisconnected := OnDisconnected;
end;
procedure TConfigCommHandler.OnConnected(Sender: TObject);
begin
FTcpConnected := true;
end;
procedure TConfigCommHandler.OnDisConnected(Sender: TObject);
begin
FTcpConnected := false;
end;
procedure TConfigCommHandler.SendCommInfo(Msg: AnsiString);
//Show string in listbox on main form
begin
if Assigned(FOnComm) then
FOnComm(Self, Msg);
end;
function TConfigCommHandler.Connect(Server: string; Port: word): boolean;
{Connect connects to the server:port}
begin
try
Result := false;
FComm.Connect(Server, Port);
while not FTcpConnected do
begin
Sleep(1);
end;
Result := FTcpConnected;
except
on E: Exception do
begin
FLastError := E.Message;
end;
end;
end;
function TConfigCommHandler.GetItem(Cmd: TIdBytes; var Data: TIdBytes): boolean;
var
Resp: AnsiString;
LPos: Integer;
begin
Result := false;
SetLength(Data, 0);
BytesToStr(Cmd, Resp);
SendCommInfo('=> ' + Resp);
try
FComm.IOHandler.Write(Cmd);
FComm.IOHandler.Write(Byte(ETX));
FComm.IOHandler.ReadBytes(Data, -1, false);
Result := Length(Data) > 0;
if Result then
begin
if Data[Length(Data)-1] <> ETX then
begin
FLastError := 'Final ETX missing!';
Result := false;
SendCommInfo(FLastError);
end
else
begin
SetLength(Data, Length(Data) -1); //Remove trailing ETX
BytesToStr(Data, Resp);
SendCommInfo('<= ' + Resp);
end;
end
else
begin
FLastError := 'No data received within timeout!';
SendCommInfo(FLastError);
end;
except
on E: Exception do
begin
Result := false;
FLastError := 'Exception: ' + E.Message;
SendCommInfo(FLastError);
Exit;
end;
end;
end;
In the main application the FOnComm procedure is implemented as follows to show incoming data:
Code: procedure TfrmMainConfig.OnComm(Sender: TObject; Msg: AnsiString);
begin
lbxComm.Items.Add(Msg);
lbxComm.ItemIndex := lbxComm.Count-1;
end;
As this test is aimed at nailing some randomly occurring timing problems I need to accurately time the arrival of the packets to see if there is any problem in the bridge device. I want to log any time deviation from the 1000 ms mark so see what is going on.
The real consumer of the data sent trough the bridge is an Android App and I suspect that we might be dealing with a problem in that, but I have to prove it. Different developers....
|
|
|
| How to call a URL from server without showing it to client? |
|
Posted by: mhammady - 11-09-2018, 12:32 AM - Forum: IntraWeb General Discussion
- Replies (5)
|
 |
Hello,
I'm trying to call a URL that have a security information from server (IW ISAPI) to another server directly without executing a JS or open a new window at the client.
I Tried IdHTTP, and winnet without success. Both gives unkown error when executed from IW form. Is there is a way to make this call directly from the user session, wait for the results, and then move on accordingly?
I'm using IW 14.2.7 with D XE5
Thx in advance...
Mohamed
|
|
|
|