Update ssdb.go

add packet encode function.