Hell guys, there is the solution for the issue. I should have explained the whole thing more clearly.
To share with you.
> [lgitlitz - Wed Sep 30 18:51:20 2009]:
>
> Hi,
>
> This gives me a much better idea of what your situation is... I put my
> responses under your comments.
>
> > [Enex - Wed Sep 30 17:43:03 2009]:
> >
> > Hello,
> >
> > I think may I use another way to ask, hehe. If any points should be
> > modified, please don't hesitate.

> >
> > Based on the truth:
> > 1, there is TCPUpdate task which can be added in Netburner.
>
> Yes, done by replacing EnableAutoUpdate with int StartTcpUpdate( int
> priority ); in your NetBurner application.
>
> > 2, there is TcpUpdate.exe in Windows matched.
>
> Correct
> Windows executable: C:\nburn\pcbin\TcpUpdate.exe
> Source: C:\nburn\pctools\tcpupdate
>
> >
> > If above two points are not correct, below is just crab and can be
> > ignored.

> >
> > Q: Is it correct that TCPUpdate task in Netburner first "listen"
the
> > request from anywhere.
> > A: Yes.
> >
> > Q: Does TcpUpdate.exe start the updating by firstl asking Netburner
to
> > setup TCP connection?
> > A: Yes.
> >
> > Q: If Netbuner is sitting behind some firewall, but TcpUpdate.exe
is at
> > such as public network. Can the tcp connection be set up?
> > A: I think No. Firewall will stop any initial request from outside.
>
> If the firewall blocks all external requests then this is true. If
you
> have access to the firewall settings then you can allow the NetBurner
> TCP port (20034) for the NetBurner IP. If you can not modify the
> firewall settings then you have a more difficult problem.
> Does this firewall allow making outgoing connections on all ports? If
> yes then you might want to modify C:\nburn\system\tcpupdate.cpp so the
> task will attempt to make an outgoing connection to the server every
set
> time period, say once a day. Keep in mind you will need to make a
> custom TCPUpdate application that allows incomming connections for
this
> to work. The NetBurner side of the code can be done by changing the
> line "int sr = accept( sl, &client_addr, &port, 0 );". Remove the 0
and
> add timeout value... ( TICKS_PER_SECOND * 60 * 60 * 24 ) this should
be
> a full day. When this function returns check to see if it is = to
> TCP_ERR_TIMEOUT or -1. This would mean you timed out and it has been
a
> full day, then try to make an outgoing connection to the server with
the
> custom TCPUpdate server application.
>
> >
> > Q: Can TcpUpdate.exe be run on linux platform?
> > A: I think No.
>
> No, this is a windows executable. If your server was a window PC then
> you could use the command line to TCPUpdate a module. For example,
say
> you have a NetBurner at IP 10.1.1.1 and you want to load foo_APP.s19
> your PC application can call:
> TcpUpdate.exe -I10.1.1.1 -Ffoo_APP.s19 -R -A
>
> It sounds like you want the NetBurner to make an outgoing connection
to
> your server, then checks its status, then updates if necessary. Due
to
> these complexities you will probably want to integrate the TCPUpdate
> functionality into your application. The core updating functionality
of
> the PC application if found in the following file:
> C:\nburn\pctools\tcpupdate\updatedlg.cpp
>
> >
> > Let's first clarify above points, hehe. No worry
> >
> > Regards,
> > Yang
> >
> >
>
> Let me know if anything else need more clarification.
>
> -Larry
Hello Larry,
Yes, that what we want to do.
As for the firewall, because in the furture, it could be very dynamic,
but at least, we know it should permit TCP connection launched from
inside.
Our scenaio at the moment is: heartbeat every certain time is used
between our Data Centre and Netburner. Data Center can use these
heartbeats to monitor Netburner's status and also use the response
message to notice Netburner if any updating.
When Netburner receive this notice, it will trigger the update. I will
use TCPUpdate task, but the talking method must be changed just as you
expect. It will launch TCP connection to Data Center.
One app in Data Centre will listen any updating requiry and do the
updating.
It's very happy that you tell me the souce code about TcpUpdate.exe. I
thought there might be no souce code. From the other side, may I should
have reviewed the Netburner development guide more detaily.
Now I need to jump into those souce code. I want to use Perl to
implement it since I just guess Perl may be easier for cross-platform.
But for the cross-platform, to be frank, I am lack of experience.
Thank you very much. The correct direction you give me is so important.
Regards,
Yang