protocols

Byte level length description

I have a protocol that requires a length field up to 32-bits, and it must be generated at runtime to describe how many bytes are in a given packet. The code below is kind of ugly but I am wondering if this can be refactored to be slightly more efficient or easily understandable. The problem is that the code will only generate enough by...

Is there a good library for dealing with the Modbus protocol in .NET?

Does anyone know of a good (preferably open source) library for dealing with the Modbus protocol? I have seen a few libraries, but I am looking for some people's personal experiences, not just the top ten Google hits. I figure there has to be at least one other person who deals with PLCs and automation hardware like I do out there. Open...

What are the most frequently used flow controls for handling protocol communication?

I am rewriting code to handle some embedded communications and right now the protocol handling is implemented in a While loop with a large case/switch statement. This method seems a little unwieldy. What are the most commonly used flow control methods for implementing communication protocols? ...

How do I register a custom URL protocol in Windows?

How do I register a custom protocol with Windows so that when clicking a link in an email or on a web page my application is opened and the parameters from the URL are passed to it? ...

Probability of finding TCP packets with the same payload?

I had a discussion with a developer earlier today re identifying TCP packets going out on a particular interface with the same payload. He told me that the probability of finding a TCP packet that has an equal payload (even if the same data is sent out several times) is very low due to the way TCP packets are constructed at system level....

What's the difference between a POST and a PUT HTTP REQUEST?

They both seem to be sending data to the server inside the body, so what makes them different? ...

how is MalformedURLException thrown in Java

I mean, how does Java decide which protocols are available? I run some code from inside Eclipse, and it works just fine. Then I run the same code from outside Eclipse, and I get "unknown protocol" MalformedURLException. Probably it has to do with the code base, or something? Any hints would be helpful. Thanks! ...

Tools for simulating and developing hardware and protocols

I want to dabble in the design of hardware and protocols, specifically for wireless mesh networking. Is there a software-based alternative to getting an FPGA setup and writing code for it? Are there any tools well-suited for coding/designing the protocol(s) for such a device? Clarification: I'm looking for free and preferably open sourc...

How to add custom protocol to Vista "Set Associations" list?

I've registered custom protocol "xyz" on Windows Vista: HKEY_CLASSES_ROOT\xyz = "URL:Extensions Protocol" It works OK with my application. Open "Control Panel -> Programs -> Default Programs -> Set Associations", scroll the list to the end. Here is the list of protocols. I would like to see my custom protocol associated with my applica...

What are the advantages of RTSP?

I am looking for the advantages of using RTSP to support streaming video to multiple devices. I have: Benefits of TCP. Commonly used protocol on web so supported by lots of infrastructure. Commonly used on web so lots of tools and stacks. Can use SSL. Wide device support (not sure on this one) Any other ideas? ...

A simple, medium secure,login protocol??

Hello there!!! I asked here about a protocol that I was asked to implement, and how secure it was. Since it seemed clear from the very beginning that it was shit. Being so I ask: Can you guys point me to some very simple login protocol (I am null at cryptography systems)?? I am developing both server and client side of the application ...

Any Generic Utilities or Libraries for Converting Hex Dumps into Human-readable Form?

I work a lot with serial communications with a variety of devices, and so I often have to analyze hex dumps in log files. Currently, I do this manually by looking at the dumps, looking at the protocol spec, and writing down the results. However, this is tedious and error-prone, especially whem messages contain hundreds of bytes and con...

What are the advantages of using a GET request over a POST request?

Several of my ajax applications in the past have used GET request but now I'm starting to use POST request instead. POST requests seem to be slightly more secure and definitely more url friendly/pretty. Thus, i'm wondering if there is any reason why I should use GET request at all. ...

Object(Output|Input)Stream binary protocol

I was wondering if anyone had some resources that describe the binary protocol used by ObjectOutputStream. I realize of course that objects themselves can specify what their data by implementing the Externalizable interface, so I guess I'm looking more toward the structure of the object graph - the metadata if you will. I am writing a C...

File Transfer Protocol options?

I am looking for a good way to transfer non-trivial (10G > x >10MB) amounts of data from one machine to another, potentially over multiple sessions. I have looked briefly at *ftp (sftp, tftp, ftp) http torrents (out because I will not have a seed network in general) rsync (not sure if I can really adapt this to what I need) Are ther...

Pseudo Random Generator with same output

I came across an article about Car remote entry system at http://auto.howstuffworks.com/remote-entry2.htm In the third bullet, author says, Both the transmitter and the receiver use the same pseudo-random number generator. When the transmitter sends a 40-bit code, it uses the pseudo-random number generator to pick a new code, which i...

What is the best way to implement protocols?

Say you are writing an application that must implement the HTTP protocol. Protocols are quite complex and may allow several commands depending on which stage of a transaction they are in. As an example, look at SMTP. An SMTP server must throw an error if the "data" command is sent before receiving "rcpt" and "mail". My question is: wha...

What is the best low-tech protocol to simulate drawing names out of a hat and ensure secrecy?

Each year at Thanksgiving, my family has drawn names out of a hat to determine who they'll be a "Secret Santa" for the Christmas gift exchange. It's important to our family culture that no one else in the family knows who each other got in order to keep it interesting. The only rule to the selection is that you can't pick your spouse. If...

Designing an application protocol

I have an existing standalone application which is going to be extended by a 3rd-party, using a network protocol. The capabilities are already implemented, all I need is to expose them to the outside. Assuming the transport protocol is already chosen (UDP), are there any resources that will help me to design my application protocol? Th...

Communicating from website to desktop application (not vice-versa)

I am designing an application such that it will have to react to certain actions required by the website, mostly the same way Last.FM client does (if you have used one) The way Last.FM client works is that, it will register a custom protocol in Windows (lastfm://) and on their website, they use that protocol to trigger certain action on...