Comments (2)
Personally, I'd stick with tools already available rather than writing your own.
Windows based systems should have PowerShell available, so I'd go with Test-NetConnection
to test connectivity to a TCP port on a remote host. For Linux based systems, install netcat (nc
) and use it to test connectivity to a TCP port on a remote host.
If you are intent on writing your own tool, this sounds like more of a question for Stack Overflow (or Google). Plenty of code examples out there on how to write a TCP client in your preferred development environment. If you are sticking to .Net environments take a look at System.Net.Sockets.TcpClient documentation. To confirm you have connectivity you would only need to confirm the TCP connection was successful, then close the connection. No need to write any data to the socket or wait for a response - just establishing the connection should be sufficient to confirm network connectivity. Any exceptions thrown would indicate a failed connection.
As this issue seems to be unrelated to an issue with this PowerShell module I'll close it off.
from hl7-powershell-module.
Or if the intent is to test a message being received, rather than confirming TCP connectivity, then yes it's possible for you to re-write the Send-HL7Message function as a non-PowerShell app. But again I would recommend using something that already exists rather than spending your effort on converting the source to remove the PowerShell dependencies.
Take a look at SmartHL7 tools - this includes a suite of Windows HL7 tools:
https://foldda.com/wp-content/uploads/2021/08/SmartHL7.Tools_.Bundle.2021.zip
The HL7 Message Sender app from the bundle looks like it would suit your needs (https://foldda.com/2021/08/01/hl7-message-sender/)
from hl7-powershell-module.
Related Issues (10)
- Missing DLL file HOT 1
- Dealing with HL7 files that start with a vertical tab HOT 3
- Remove-HL7Identifiers in Core 7 not working HOT 7
- Consider publishing on PSGallery HOT 5
- Why this filter does not work ? HOT 2
- Consider the ability to include a list of parameters for Select-HL7Item -ItemPosition HOT 3
- Manage several occurrences of the same segment HOT 3
- Filter returns more matches than expected HOT 10
- Receive-HL7Message -NOACK HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hl7-powershell-module.