皮皮网
皮皮网
fancoo源码

【ae素材站源码】【狮子猫源码】【zpkin 源码解析】mg源码接口

时间:2024-12-24 09:04:18 分类:探索 编辑:excel 导入 php源码
1.C++开源http服务框架WHttpServer
2.com口的用出

mg源码接口

C++开源http服务框架WHttpServer

       介绍

       基于mongoose 7.3版本的源码源码,经过二次封装和修改,接口WHttpServer是源码ae素材站源码一个高性能的C++开源HTTP服务框架。该框架支持Linux操作系统,接口macOS系统下需要自行适配库,源码狮子猫源码暂时未验证在Windows系统下的接口zpkin 源码解析运行情况。用户可以通过查看示例文件(HttpExample.cpp、源码HttpExample.h和main.cpp)来了解如何在普通接口、接口大文件上传、源码大文件下载、接口chunk流文件下载等场景中使用。源码

       运行操作系统

       WHttpServer适用于Linux操作系统。接口在macOS系统上可以运行,源码自学源码剖析但需要修改CMakeLists.txt文件以适配openssl库。接口Windows系统理论上可以运行,源码分享程序源码但因无测试支持,暂不推荐。

       安装教程

       将w口的用出

       ç™¾åº¦æœ‰å­—数限制,连源代码的一个类都粘不上,下面这个类是发送接收短信的类的一部分,这个类总共有一千二百多行,根本粘不全,你可以参考一下。

       çŸ­ä¿¡ç»ˆç«¯æ“ä½œçš„关键是短信的编码和解码,英文资料很多,中文的基本找不到,你可以多查些资料。

       Option Explicit On

       Public Class Jwc

        '_______________声明mscomm控件__________________

        Public MSComm1 As New MSCommLib.MSComm

        '__________________串口调试_____________________

        Dim bug As String

        Public B_bug As Boolean = False

        '__________________串口设置_____________________

        Public L_com() As String

        Public I_P As Integer = 1 '端口号

        Public S_Set As String = ",n,8,1" '初始字符串

        Public C_open As Boolean = False

        Public ret_l As Double

        '__________________短信共用变量_________________

        Dim l_msg_c As Integer = 0

        Dim l_msg_i As Integer = 0

        Dim l_msg_t As Integer = 0

        Dim l_msg_x As Integer =

        '__________________读取短信_____________________

        Public ID1 As String '短信编号

        Public ID2 As String '短信分类

        Public n1 As Integer '短信中心号码长度

        Public n2 As Integer '被叫号码长度

        Public n3 As Integer '用户数据长度

        Public n4 As Integer '日期长度

        Public np1 As String '短信中心号码

        Public np2 As String '被叫号码

        Public da1 As String '日期

        Public sp1 As String '用户数据

        Public Cont As Integer '短信个数

        Public scod As String '编码方式

        Dim ms(, )

        '_______________发送短信________________________

        Public s_mg As String

        Public m_succ As Boolean '短信发送状态

        Public cs1 As String = ""

        Public cs2 As String = "D"

        Public cs3 As String = ""

        Public Lms As Integer

        '_______________接收短信________________________

        Public mg_count As Integer = 0

        Public mg_ade() As Integer

        Public mg_N As Boolean = False

        '_______________读取联系人______________________

        Dim Pbook(, 2) As String

        Public bookcont As Integer

        '_______________打开设备________________________

        Public Function PhoOpen() As Boolean

        Dim i As Integer

        Dim j As Integer

        Dim n As Integer

        Dim coms() As Integer

        PhoOpen = False

        If C_open Then

        PhoOpen = True

        Exit Function

        End If

        For i = 0 To

        L_com(i) = ""

        Next

        j = 0

        For i = 1 To

        If CheckCom(i) Then

        L_com(j) = i

        'MsgBox(j & " " & i)

        j = j + 1

        End If

        Next i

        '触发OnComm事件的字符长度

        For i = 0 To j - 1

        n = L_com(i)

        'MsgBox(i & " " & n)

        I_P = n '记录当前端口号

        If CheckModem(n) Then

        'MsgBox("连接成功!")

        PhoOpen = True

        C_open = True

        PhoLoading()

        Exit For

        End If

        Next i

        End Function

        '_______________发送AT指令______________________

        Public Function ATcode(ByVal s As String) As String

        If Not C_open Then

        Call PhoOpen()

        If Not C_open Then

        'MsgBox("未发现设备!", vbInformation)

        ATcode = "未发现设备!"

        Exit Function

        End If

        End If

        ATcode = ""

        MSComm1.Output = s

        Dim i As Integer

        Dim t As String

        Dim Sall As String = ""

        For i = 0 To

        System.Threading.Thread.Sleep()

        t = MSComm1.Input

        While Len(t) > 0

        Sall = Sall & t

        t = ""

        i = 0

        End While

        If ATend(Sall) Then

        Exit For

        End If

        If i >= Then

        Me.C_open = False

        PhoClose()

        End If

        Next

        ret_l = Len(Sall)

        'If ret_l = 0 Then

        ' Sall = "连接超时!"

        'End If

        CheckNewMsg(Sall)

        ATcode = Sall

        End Function

        Public Function ATend(ByVal s As String) As Boolean

        Dim i As Integer

        Dim t As String = ""

        Dim Sall As String = ""

        For i = 1 To Len(s)

        t = Mid(s, i, 1)

        If t <> Chr() And t <> Chr() And t <> Chr() Then

        Sall = Sall + t

        End If

        Next

        ATend = False

        m_succ = False

        If Right(Sall, 1) = ">" Then

        ATend = True

        m_succ = True

        Exit Function

        End If

        If Right(Sall, 2) = "OK" Then

        ATend = True

        m_succ = True

        Exit Function

        End If

        If Right(Sall, 5) = "ERROR" Then

        ATend = True

        Exit Function

        End If

        If Right(Sall, 7) = "CARRIER" Then

        ATend = True

        Exit Function

        End If

        End Function

        '_______________读取短信________________________

        Function Getmsg(ByVal i As Integer, ByVal j As Integer) As String

        Getmsg = ""

        Try

        Getmsg = ms(i, j)

        Catch ex As Exception

        End Try

        End Function

        '_____________发送短信_________________________

        Function SMG(ByVal n1 As String, ByVal n2 As String, ByVal s1 As String) As Boolean

        Dim l1 As String

        Dim l2 As String

        Dim l3 As String '十六进制长度

        Dim ln1 As String

        Dim ln2 As String

        Dim ln3 As String '十进制长度

        Dim t1, t2, t3 As String

        Dim mg As String

        Dim m() As String

        Dim m_l() As String

        Dim m_c As Integer

        Dim ms1, ms2 As String

        Dim i As Integer = 0

        t1 = ""

        t2 = ""

        t3 = ""

        ms1 = ""

        ms2 = ""

        '_________处理短信中心号码__________

        t1 = Trim(n1)

        If Left(t1, 1) = "+" Then '去掉号码前面的+号

        t1 = Right(t1, Len(t1) - 1)

        End If

        ln1 = Len(t1)

        If ln1 < Then

        l1 = "0" & Hex(Len(t1)) '获得短信中心号码长度

        Else

        l1 = Hex(Len(t1))

        End If

        t1 = NtoS(n1) '翻转短信中心号码

        'MsgBox(l1)

        '__________处理联系人号码___________

        t2 = Trim(n2)

        If Len(t2) = Then '当号码为位时补足位

        t2 = "" & t2 '前面加

        End If

        ln2 = Len(t2)

        If ln2 < Then

        l2 = "0" & Hex(Len(t2)) '获得联系人号码长度

本文地址:http://04.net.cn/news/65b323096704.html

copyright © 2016 powered by 皮皮网   sitemap