ca证书
This commit is contained in:
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user