Use own TCP layer implementation with QuickFIX/J - quickfixj

My codebase relies on an internal TCP layer implementation which does TCP session multiplexing using a non blocking selector pattern (java.nio). This means I can create a single threaded app that can handle any number of TCP sessions.
The application I am working on should ideally be single threaded. I can't find a way to have QuickFIX/J run on the same thread my application is running on. Would there be a way for me to use QuickFIX/J only as a pure FIX protocol translator by passing the data in/out of my TCP layer into QuickFIX/J?

Related

Monitoring and blocking traffic without using arp protocol

Is it possible to monitor and modify traffic without using the arp protocol? I am trying to develop an app that monitors and manages flow of traffic however, there is a rival company that has a patent on using arp and tcp for this use.
I looked into building a firewall but that uses arp/ndp so it has to be caught on another TCP layer. Any info you can provide will be helpful.

Send data out from GNU Radio companion to other software via TCP/LAN protocol

I am new to GNU Radio and Linux.
I want to send processed data out from gnu companion to a software/dashboard whose input is LAN/TCP/IP.
I am using RTL dongle and USRP and i have done GMSK demodulation successfully.Now want to send the demodulated data to a software for presentation and display developed by another team.The dashboard/software uses Ethernet data as input and has ip address and port as input parameters.
Currently i failed to send a random data via TCP sink and receive it via TCP source blocks on loopback address.
Please help me
Did you set the TCP Sink to "Server", and the Source Block to "Client"? Only the block that is set to "Client" needs to know the address, but both need to know the Port.
And is the port you use for your loopback test free, or could another program be using it?
Also, if the Nonblocking mode for the TCP blocks is off, the execution of the flowgraph is halted until a connection is established. I’m not sure but I think that could lead to problems if they are supposed to connect to each other in the same flowgraph.
Try using an external program (like netcat) for debugging instead. netcat will probably not display it correctly but it’ll tell you if any data at all is coming through.
Additionally, the TCP source and TCP sink blocks are deprecated and shouldn’t be used, use UDP or ZeroMQ for communicating with external programs instead, if possible.

What is the difference between ServerSockets and Websockets?

There appears to be 2 ways to maintain an open connection between a Dart server and a Dart client: ServerSocket and Websocket.
https://www.dartlang.org/dart-by-example/#sockets
https://www.dartlang.org/dart-by-example/#websockets
When is it best to use one instead of the other?
Websocket is a protocol build on top normal sockets that are based on the TCP protocol (ServerSocket and Socket). Websockets give you more comfort during programing, because it helps you with:
Framing: TCP is stream based, Websockets allow you to send packages. You don't have to find the start and end of your package on your own.
Closing Handshake: You can send a connection close reason.
Security (in browser context, not required in console application context)
You can also access your Websocket server via a Webbrowser API.
If you want to work together with existing Servers / Clients that are using TCP, that you have to use ServerSockets. Websockets and ServerSockets are not compatible (intentionally, for security reasons).
As Websockets have more internal stuff to do the performance and throughput will not be as good as raw TCP, but this point is negligible.
Both protocols can be used with encryption, Websockets by using a HTTPS connection (wss://) and TCP using TLS (SecureSocket and SecureServerSocket).
For more details about Websockets, take a look at the RFC. RawDatagramSocket allows you to use the UDP protocol in addition to the TCP based ServerSockets.

NSStream vs. NSURLConnection simultaneous open TCP

I still need an understanding of these things, anyway, does NSStream or NSURLConnection support multiple open TCP, say for example,
www.xyz.com port:4040
www.xyz.com port:5050
www.xyz.com port:5150
This is a only one host.
Which of the two can support the task of simultaneously opening a TCP port and keeping it open for a stated period of time, on the event none does, is there any existing iOS class/method that I can use to achieve this behavior.
My end goal is to create multiple TCP connections at a given time.
Please help
Yes.. you can create multiple TCP connections to same host but different ports using NSStream and CFSocket...

Detect unreachable ports for UDP in Erlang

I am looking for a way to detect "port unreachable" errors for outgoing UDP packets in Erlang, so I can eagerly report transport layer errors to the application. I.e, I want to capture ICMP type 3 packets to report to the higher layers that packet have not reached the destination.
Currently I know about two approaches:
Use undocumented gen_udp:connect/3. However, it seems like this requires opening a new socket for every new destination pair address:port. The advantage is that this does not require any privileges.
Use gen_icmp which requires either setuid helper or capabilities to open raw sockets.
Are there any other variants I am missing?
procket might be what you're looking for, but I've never used it myself. It's a binding to the low-level socket API, therefore it allows you to use all the protocols the underlying API supports. I'm just quoting its README, so please take it with a pinch of salt.

Resources