Git Product home page Git Product logo

dotnet-message-sender's Introduction

MessageSender

Introduction

MessageSender is a C# Windows Form application. It is a simple application that acts as the client and sends requests to different connection types/communication protocols and displays the response.

Structure

The entire repository is a Visual Studio project solution. There are 8 projects in it.

The solution file can be found in MessageSender folder.

The projects can be categorised in two groups. One is the MessageSender application, and the other is the different connection types/communication protocols.

The structure is displayed below:

  • Solution
    • CommunicationProtocols
      • HttpSocket
        • HttpSocketFile (Project)
        • HttpSocketMessage (Project)
      • Socket
        • SocketAsyncFile (Project)
        • SocketAsyncMessage (Project)
        • SocketSyncFile (Project)
        • SocketSyncMessage (Project)
      • HttpRestApi (Project)
    • MessageSender (Main Project) (Solution file found here)

MessageSender UI

Control Tab

This tab is where you can control the

  • Connection type you want (Socket, HttpSocket, HTTP or AWS)
  • Additional information for your request (e.g. Custom Http Headers or AWS token)
  • Preparing the connection
  • Preparing which data to send (Message or File; the Content Types)
  • The sending method (sending message synchronously or asynchronously)
  • Download response as text files to a directory of your choice

Below shows an image of the Control tab:

MessageSender Control Tab

Configuration Tab

Below shows an image of the Configuration tab: This tab is where you can configure the

  • Directory of where the logs will be saved at
  • Host connection which is the identifier of where you want the request to do (Note: Secure True is HTTPS , and Secure False is HTTP)
  • AWS information (Note: This is not tested properly)
  • HTTP information which customises the endpoint, method and headers

Note: To customise HTTP or AWS request, you need to make sure to โœ“ the appropriate checkbox in the Control tab under the Include Addition Information Into Connection section

MessageSender Configuration Tab

Response Tab

This tab is just reponsible for displaying the body of the response received.

Below shows an image of the Response tab:

MessageSender Response Tab

How It Works

For the different data preparation types (Message and File), it converts the text/files into a byte stream, appends them into the request body and uses the HttpWebRequest class to send the request and receive the response. In the CommunicationProtocols folder, there are some examples that you can follow to get a head start.

Closing Thoughts

While I think this simple application is mostly functional. I still think that many things can be improved and there are probably bugs lying around somewhere.

dotnet-message-sender's People

Contributors

kleejh avatar

Watchers

 avatar

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.