CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Can an embedded webserver act as a TCP client as well??

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tranz



Joined: 10 Feb 2007
Posts: 78

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

Can an embedded webserver act as a TCP client as well??
PostPosted: Tue Apr 01, 2008 2:17 pm     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Apr 01, 2008 10:14 pm     Reply with quote

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

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

PostPosted: Wed Apr 02, 2008 2:25 pm     Reply with quote

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

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

PostPosted: Wed Apr 02, 2008 2:50 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group