Lecture Handout

advertisement

Networking information

Manual DNS Stuff http://www.whatsmyip.org/ http://www.dnsstuff.com/

List of which ports are used by which programs http://www.iana.org/assignments/service-names-port-numbers/service-namesport-numbers.txt

Intro to TCP/IP http://www.yale.edu/pclt/COMM/TCPIP.HTM

Request for comments (RFCs)

These are the draft and final specifications for how computer stuff (especially networks) should work. They’re quite detailed, but if you’re interested in how networks stick together, they’re a must. For links to the RCFs, including some geeks find “amusing” (yes, there really is one for networking using pigeons)… http://en.wikipedia.org/wiki/Request_for_comments

RCF1062 Network Numbers

– which people own which IPv4 numbers http://www.cse.ohio-state.edu/cgi-bin/rfc/rfc1062.html

RCF2068 HTTP1.1 http://www.w3.org/Protocols/rfc2068/rfc2068

Web design

For further information on web design see the course web links page.

There is a tutorial on writing webpages at… http://www.geog.leeds.ac.uk/courses/other/web/writing/

Which is also linked from the course web links page. This will take you through writing simple webpages, putting in links, graphics and tables, and give you some hints on how to produce useable and readable websites.

Links from the lecture

We won’t cover signing Applets in this course. For more information, see... http://www.oracle.com/technetwork/java/javase/tech/java-code-signing-1915323.html

For more information on the Java Plugin, and how to set it up, see… http://www.oracle.com/technetwork/java/index-jsp-141438.html

Accessibility

You can find out about Section 508 of the US Rehabilitation Act at… http://www.section508.gov/

You can find out about the UK’s Special Educational Needs and Disability Act 2001 at… http://www.ukcle.ac.uk/resources/directions/previous/issue4/senda/

And the Disability Discrimination Act 1995 at… http://www2.warwick.ac.uk/fac/soc/law/elj/jilt/2001_2/sloan/

You can find out more about the accessibility built into Swing here: http://docs.oracle.com/javase/tutorial/uiswing/misc/access.html

You can turn off the Java support for most browsers temporarily to see the effect on your web pages.

In Firefox: http://support.mozilla.com/en-US/kb/How%20to%20turn%20off%20Java%20applets

In IE9:

Gear-shaped menu > Internet Options > Security Tab > Custom Level >

Scripting > Scripting of Java Applets > Check “Disable” option

} import java.net.*; import java.io.*; import java.util.*; public class Server { public Server() {

ServerSocket ss = null; try { ss = new ServerSocket(9999);

} catch (IOException ioe) { ioe.printStackTrace();

}

Socket s = null; try {

} s = ss.accept();

} catch (IOException ioe) { ioe.printStackTrace();

BufferedInputStream in = null; try { in = new BufferedInputStream(s.getInputStream());

} catch (IOException ioe) { ioe.printStackTrace();

} try {

} int c = 0; while ((c = in.read()) > -1) {

}

System.out.print((char)c); in.close();

} catch (IOException ioe) { ioe.printStackTrace();

} public static void main (String args[]) { new Server();

}

import java.net.*; import java.io.*; public class Client { private byte[] addr = {127,0,0,1}; // 127.0.0.1 is LOCALHOST. public Client() {

InetAddress i = null; try { i = InetAddress.getByAddress(addr);

} catch (UnknownHostException uhe) { uhe.printStackTrace();

}

Socket s = null; try { s = new Socket(i, 9999);

} catch (IOException ioe) { ioe.printStackTrace();

}

BufferedOutputStream b = null; try { b = new

BufferedOutputStream(s.getOutputStream());

} catch (IOException ioe) {

} ioe.printStackTrace();

// DOS actually uses a quite complicated character

// set mapping, so char 170 may not be the logical

// negation symbol for you. Given this, see what

// character is printed by this line and use that.

// Alternatively, if it isn't on your keyboard,

// adjust this number until you find one that is,

// and change the 170 throughout.

System.out.println("To end communications, type " + try {

(char)170 + " and enter."); int c = 0; while ((c = System.in.read()) != 170) { b.write(c); b.flush();

} catch (IOException ioe) { ioe.printStackTrace();

}

} s.close();

} public static void main (String args[]) { new Client();

}

}

Download