Skip to content

Commit

Permalink
A little bit of syntax highlighting in README
Browse files Browse the repository at this point in the history
  • Loading branch information
rozag committed Feb 10, 2018
1 parent 14b99fa commit 20e4acf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Frame Mode
---------------
Assuming we're working from MainActivity.java, we start with

```
```java
import java.io.IOException;
import org.quietmodem.Quiet.*;

Expand Down Expand Up @@ -89,7 +89,7 @@ try {
This sets up our transmitter and receiver using the packaged configuration. We choose the audible mode here. Now we can transmit.

On one side we might run
```
```java
// set receiver to block until a frame is received
// by default receivers are nonblocking
receiver.setBlocking(0, 0);
Expand All @@ -104,7 +104,7 @@ try {
```

And on the other side
```
```java
String payload = "Hello, World!";
try {
transmitter.send(payload.getBytes());
Expand All @@ -120,7 +120,7 @@ UDP/TCP Mode
If we want to do interactions between two devices, or if we'd like retransmits and automatic data segmentation, then TCP is the way to go.

First we build a new NetworkInterface.
```
```java
import java.io.IOException;
import java.net.SocketException;
import org.quietmodem.Quiet.*;
Expand Down Expand Up @@ -157,7 +157,7 @@ If we're using Quiet in an ad-hoc manner, we'll need to discover any peers nearb

On each side we might run something like this.

```
```java
// org.quietmodem.Quiet.DatagramSocket
DatagramSocket s = null;
try {
Expand Down

0 comments on commit 20e4acf

Please sign in to comment.