View previous topic :: View next topic |
Author |
Message |
tranz
Joined: 10 Feb 2007 Posts: 78
|
Can an embedded webserver act as a TCP client as well?? |
Posted: Tue Apr 01, 2008 2:17 pm |
|
|
Hello,
I have a working embedded webserver which would be used for another application. But as it seems, I have to make it into a TCP/IP client as well.
Thus my question is, is it possible to have a HTTP webserver and the tcp/ip client at the same time. if not the same time, then what kind of possible methods can be used to make this possible.
Any response would be deeply appreciated.
Thanks |
|
|
dbotkin
Joined: 08 Sep 2003 Posts: 197 Location: Omaha NE USA
|
|
Posted: Tue Apr 01, 2008 10:14 pm |
|
|
Perhaps you could give a little more detail. What does it need to do, in addition to being a web server?
As for whether it's possible -- well, that depends on the processor, how much available memory it has, and what you're trying to do. |
|
|
tranz
Joined: 10 Feb 2007 Posts: 78
|
|
Posted: Wed Apr 02, 2008 2:25 pm |
|
|
I am using a 18F4680 which is acting as a webserver to display a webpage. Also I want this to act as a TCP/IP client, where in I will be able to send data to it from my PC, which will be acting as a server then for further processing.
The processing will be done by another PIC ( 16F877A ) which is interfaced with this one through SCI. So basically 18F4680 will be acting like a buffer and recieving this data.
I have been able to make it work like a client seperately, and a server seperately. But when I tried to make it work together the server part works, but the client part does not seem to respond. Although I have created a different subroutine for the client.
It still does not seem to work. So I was wondering whether it is possible or not in the first place. |
|
|
tranz
Joined: 10 Feb 2007 Posts: 78
|
|
Posted: Wed Apr 02, 2008 2:50 pm |
|
|
I am trying to identify the remote server by putting the condition
Code: |
if (TCB[s].remote.IPAddr.v[0]==131 && TCB[s].remote.IPAddr.v[1]==202 && TCB[s].remote.IPAddr.v[2]==10
&& TCB[s].remote.IPAddr.v[3]==73)
{
ServerAddrInit();
MyTCPTask();
StackTask();
} |
by doing so, if this condition comes true then the TCP/IP webserver should be able to take over. But it does not seem to solve the problem. |
|
|
|