I assume you mean you tried to use the two examples to talk to yourself?
My guess is that it didn't work because they're using different protocols and I'm not sure whether you can simulate a listening device.
My own experience with these converters (including some old Lantronix models) is that you use them instead of a serial port.
For example, suppose that you have a serial device which you have code for.
Change the code to use TCP instead of serial (theoretically, VISA should help you with this, but I use the TCP functions, so I never got around to checking out how TCP comm with VISA works), so you're sending the same string, but instead of opening a connection to the serial port, you open a TCP connection to the converter.
Some of them also have an option of functioning as a virtual port, so you don't even have to change your code - you just define the virtual port in their software and then tell your program to use that port instead of the physical one.
___________________
Try to take over the world!