You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
621 B
Java
28 lines
621 B
Java
4 years ago
|
// SMTP.java (C) K. J. Turner, P. K. Johnson 04/03/06
|
||
|
|
||
|
// Simple Mail Transfer Protocol
|
||
|
|
||
|
package protocol;
|
||
|
|
||
|
import java.util.*;
|
||
|
import support.*;
|
||
|
|
||
|
public class SMTP extends Protocol {
|
||
|
|
||
|
private SMTPSender client;
|
||
|
private SMTPReceiver server;
|
||
|
|
||
|
public SMTP() {
|
||
|
medium = new Medium();
|
||
|
client = new SMTPSender(medium, "Client");
|
||
|
server = new SMTPReceiver(medium, "Server");
|
||
|
client.setPeer(server);
|
||
|
server.setPeer(client);
|
||
|
entities = new Vector<ProtocolEntity>();
|
||
|
entities.addElement(client);
|
||
|
entities.addElement(medium);
|
||
|
entities.addElement(server);
|
||
|
}
|
||
|
|
||
|
}
|