1
This commit is contained in:
parent
58c8b73ca3
commit
bc986a954f
@ -1,9 +1,5 @@
|
|||||||
package constant
|
package constant
|
||||||
|
|
||||||
const (
|
|
||||||
MAX_PACKET_LEN = 1024 * 64
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MAIL_DB = "maildb"
|
MAIL_DB = "maildb"
|
||||||
)
|
)
|
||||||
@ -16,8 +12,8 @@ const (
|
|||||||
MAX_MODULE_IDX
|
MAX_MODULE_IDX
|
||||||
)
|
)
|
||||||
|
|
||||||
// mail
|
|
||||||
const (
|
const (
|
||||||
MAIL_TYPE_PLAYER = 1
|
MAIL_TYPE_PERSONAL = 1
|
||||||
MAIL_TYPE_GROUP = 2
|
MAIL_TYPE_GROUP = 2
|
||||||
|
MAIL_TYPE_ALL = 3
|
||||||
)
|
)
|
||||||
|
@ -19,6 +19,8 @@ type mail struct {
|
|||||||
content string
|
content string
|
||||||
sendTime int32
|
sendTime int32
|
||||||
expireTime int32
|
expireTime int32
|
||||||
|
userRegStart int32
|
||||||
|
userRegEnd int32
|
||||||
attachments []*attachment
|
attachments []*attachment
|
||||||
userGroups map[int64]*userGroup
|
userGroups map[int64]*userGroup
|
||||||
reciver string
|
reciver string
|
||||||
|
@ -18,21 +18,19 @@ type userGroup struct {
|
|||||||
|
|
||||||
type mailMgr struct {
|
type mailMgr struct {
|
||||||
idHash map[int64]*mail
|
idHash map[int64]*mail
|
||||||
|
allMails map[int64]*mail
|
||||||
userMailArr [1024]*userMail
|
userMailArr [1024]*userMail
|
||||||
groupHash map[int64]*userGroup
|
groupHash map[int64]*userGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *mailMgr) Init() {
|
func (this *mailMgr) Init() {
|
||||||
this.idHash = make(map[int64]*mail)
|
this.idHash = make(map[int64]*mail)
|
||||||
this.fetchmailFromDB()
|
this.loadFromDB()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *mailMgr) UnInit() {
|
func (this *mailMgr) UnInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *mailMgr) fetchmailFromDB() {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *mailMgr) loadFromDB() {
|
func (this *mailMgr) loadFromDB() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user