From 20e4acfdb60ac649ee39cb1128f49f574295047d Mon Sep 17 00:00:00 2001 From: Alexey Mileev Date: Sat, 10 Feb 2018 23:05:43 +0100 Subject: [PATCH] A little bit of syntax highlighting in README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ac48a63..4ea7188 100644 --- a/README.md +++ b/README.md @@ -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.*; @@ -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); @@ -104,7 +104,7 @@ try { ``` And on the other side -``` +```java String payload = "Hello, World!"; try { transmitter.send(payload.getBytes()); @@ -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.*; @@ -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 {