UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor zly
Visitor
2,909 Views
Registered: ‎08-16-2013

help! question on lwip raw api tcp_connect and tcp_listen

I'm using lwip tcp/ip to send and receive data between two boards, when one board is set as client, how could it send data and listen on port at the same time?

I new a pcb pcb = tcp_new(); , bind it to ip and pcb = tcp_listen(pcb);  to put it in the listening queue, then I write tcp_connect(pcb, &server_ip, 7, connect_callback);  but this connection failed to make, so how should I use one board as client and at the same time listen and receive data?

Could two pcb bind to one ip address?

0 Kudos
2 Replies
Participant julian.bauer
Participant
1,225 Views
Registered: ‎11-18-2016

Re: help! question on lwip raw api tcp_connect and tcp_listen

you can create two or more pcb structures and bind them to the same IP but at different ports!

0 Kudos
Newbie 20902163
Newbie
672 Views
Registered: ‎05-29-2018

Re: help! question on lwip raw api tcp_connect and tcp_listen

Can't we use two threads to connect to the same IP and Port to act as both a server and a client?

0 Kudos