changeset 14:0ac009f1c69e

*** empty log message ***
author pin
date Mon, 23 Oct 2006 02:26:26 +0900
parents d8a7523ee386
children 535f124c2fc3
files src/remoteeditor/network/REP.java src/remoteeditor/network/RSocketEvent.java
diffstat 2 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/remoteeditor/network/REP.java	Mon Oct 23 01:23:49 2006 +0900
+++ b/src/remoteeditor/network/REP.java	Mon Oct 23 02:26:26 2006 +0900
@@ -4,6 +4,8 @@
 import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
+import java.util.LinkedList;
+import java.util.List;
 
 import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.window.Window;
@@ -39,6 +41,8 @@
 	private RSocketListener socketListener;
 	private Shell shell;
 	
+	List myCmdList = new LinkedList();
+	
 	public REP() throws Exception {
 		String host = "localhost";
 		int port = 8080;
@@ -183,7 +187,7 @@
 				e.printStackTrace();
 			}
 			System.out.println("read packet:" + cmd +", "+ sid +", "+ eid +", "+ seqid +", "+ lineno +", "+ textsiz +", "+ string);
-			socketListener.packetReceived(new RSocketEvent(lineno, textsiz, string));
+			socketListener.packetReceived(new RSocketEvent(cmd, sid, eid, seqid, lineno, textsiz, string));
 		}	
 		
 	}
--- a/src/remoteeditor/network/RSocketEvent.java	Mon Oct 23 01:23:49 2006 +0900
+++ b/src/remoteeditor/network/RSocketEvent.java	Mon Oct 23 02:26:26 2006 +0900
@@ -2,20 +2,20 @@
 
 public class RSocketEvent {
 	private int length;
-	private int offset;
+	private int lineno;
 	private String text;
 	
-	public RSocketEvent(int offset, int length, String text) {
-		this.length = length;
-		this.offset = offset;
+	public RSocketEvent(int cmd, int sid, int eid, int seqid, int lineno, int textsiz, String text) {
+		this.length = textsiz;
+		this.lineno = lineno;
 		this.text = text;
 	}
 	
 	public void setLength(int length){
 		this.length = length;
 	}
-	public void setOffset(int offset){
-		this.offset = offset;
+	public void setOffset(int lineno){
+		this.lineno = lineno;
 	}
 	public void setText(String text){
 		this.text = text;
@@ -24,8 +24,8 @@
 	public int getLength(){
 		return length;
 	}
-	public int getOffset(){
-		return offset;
+	public int getLineNo(){
+		return lineno;
 	}
 	public String getText(){
 		return text;