Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

Implementing both LAN Server and Client using S7G2 with only one physical LAN connection

$
0
0

Hello,

I am currently working on an ethernet application using the SK-S7G2. I need to implement a client to connect to one of our host programs and a server listening at port 80 for http using just only one physical LAN connection of the S7G2. I was able to connect, send and receive data as a client using NetX BSD support. I'd like to implement the server part of the program so I created a separate thread for it. So far I've been able to successfully create a socket and bind. Now here is the problem, With that part of the server code now added to the program, I am no longer able to connect as a client to our host program at port 50000. I am still able to create a socket for the client application but when it goes to the socket connect, it just hangs there. At this point, the program has already executed the bind for the server side. I am using different socket ID's for both and I am communicating at different ports. Any suggestions on what I am missing? Do I need a separate module configuration for the server? I am using only one physical hardware LAN connection present on the S7G2 board. Any sample programs I could follow. I am able to connect and implement the client without a problem if I block out the create socket and bind lines of code on the server. I am sure there must be a way todo both with just one physical connection. 

 

Thanks.

AJ 


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>