001    package org.protocol;
002    
003    import java.util.*;
004    import java.io.*;
005    import java.net.*;
006    import java.awt.*;
007    import java.awt.event.*;
008    import javax.swing.*;
009    import javax.swing.event.*;
010    
011    public class SimpleUDPConnection implements Connection {
012    
013            private DatagramPacket packet_;
014            private DatagramSocket socket_;
015            private int port_;
016            private int timeout_;
017            private int buf_size_;
018            private InetSocketAddress address_;
019            private ArrayList<Connection> connection_list_ = new ArrayList<Connection>();
020    
021            protected SimpleUDPConnection() {
022            }
023            
024            public SimpleUDPConnection(InetSocketAddress address, int timeout, int buf_size) throws Exception {
025                    
026            }
027            
028            public void send(String message) throws Exception {
029            }
030            public String receive() throws Exception {
031                    return null;
032            }
033            public InetSocketAddress getRemoteAddress() {
034                    return address_;
035            }
036    /*
037            private void init() throws Exception {
038                    byte[] buf_ = new byte[buf_size_];
039                    packet_ = new DatagramPacket(buf_, buf_.length);
040                    socket_ = new DatagramSocket(port_);
041            }
042    */
043    
044            public static void main(String[] args) throws Exception {
045            }
046    
047            public static void alert(Object message) {
048                    System.out.println(message);
049            }
050    }