This commit is contained in:
TsMask
2023-08-21 11:02:58 +08:00
parent 788f01674a
commit 4a3e6d7d67
26 changed files with 664 additions and 50 deletions

View File

@@ -145,7 +145,7 @@ func (this *TcpClient) Receive() {
func (this *TcpClient) Start() {
//登录
data := "reqLoginAlarm;user=omc;key=omc@password;type=ftp"
data := "reqLoginAlarm;user=audit;key=omc@password;type=ftp"
this.SendMsg(0x01, []byte(data))
//发送同步告警信息
@@ -162,7 +162,7 @@ func (this *TcpClient) Start() {
}
func DataMock() {
conf := "root:1000omc@kp!@tcp(192.168.0.229:33066)/omc_db?charset=utf8mb4&parseTime=True&loc=Local"
conf := "root:1000omc@kp!@tcp(192.168.4.130:33066)/omc_db?charset=utf8mb4&parseTime=True&loc=Local"
d, err := gorm.Open(mysql.Open(conf), &gorm.Config{})
if err != nil {
zlog.Ins().ErrorF("open mysql %s error, ", conf, err)
@@ -212,7 +212,7 @@ func NewTcpClient(ip string, port int) *TcpClient {
}
func main() {
client := NewTcpClient("127.0.0.1", 31232)
client := NewTcpClient("192.168.4.130", 31232)
client.Start()
//DataMock()
select {}