Giter Site home page Giter Site logo

Comments (2)

RobHolme avatar RobHolme commented on June 14, 2024

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.

RobHolme avatar RobHolme commented on June 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.