Hello,
I'm working on C6748 EVM, CCS5, bios_5_41_11_38, ndk_2_20_05_33.
I have a listener on some port on local host on the PC ("127.0.0.1") , and I want to establish a connection of EVM with this port.
How should I do that?
Anatoly.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I'm working on C6748 EVM, CCS5, bios_5_41_11_38, ndk_2_20_05_33.
I have a listener on some port on local host on the PC ("127.0.0.1") , and I want to establish a connection of EVM with this port.
How should I do that?
Anatoly.
Anatoly,
The overiew of the steps goes like this:
1. create a socket
2. connect to the server IP address
3. send and receive data
A quick Google search led me to this page, which gives an overview for Linux. The process for the NDK is very similar:
http://www.linuxhowtos.org/C_C++/socket.htm
Steve
I need actually to connect the socket to port that PC's local host is listening to. By local host I mean the default network loopback by address 127.0.0.1.
Does the NDK has such loopback support and how can I connect the socket from EVM to a listener port on local host IP (on PC)?
I guess I need some more information on what you are trying to do. I thought that 127.0.0.1 was a special, reserved IP address for loopback tests. So, all transfers to that address (e.g. ping 127.0.0.1) wouldn't even go out onto the wire. They would just stay within the stack itself.
So you are trying to connect to 127.0.0.1 but not on the NDK, but the PC's localhost address?
I'm listening on 127.0.0.1 : 1001 on PC.. I want to know how can I connect my EVM to this port 1001 and transfer/receive data?
Anatoly,
I'm just a bit curious what you are trying to achieve here ...
According to the book "TCP/IP Illustrated Volume 1":
Having said that, I see in the NDK code (ipout.c, line 179 - 181) which handles loopback packets:
// We never transmit a loopback address
if( IN_LOOPBACK(IPDst) )
goto local_packet;
You could edit this file and remove that code, then rebuild the NDK. However, I would not recommend this given that this would seemingly break the TCP/IP rules. And if you do attempt this and experience problems, we will not be able to support you with that.
Steve