一个仿qq的程序源码
一个用纯java开发的
源代码在线查看: message.java
package qianqian.p2pchat.message;
import qianqian.p2pchat.control.Peer;
public abstract class Message implements java.io.Serializable {
private static final long serialVersionUID = 1L;
private String msg = null;
private Peer from = null;
public Message(){
msg = null;
from = null;
}
public Message(String iMsg, Peer iFrom) {
msg = iMsg;
from = iFrom;
}
public Peer getSender() {
return from;
}
public String getMsgContent() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public void setSender(Peer from) {
this.from = from;
}
}