mirror of
https://gitee.com/farsunset/cim.git
synced 2025-07-22 15:56:42 +08:00
18 lines
293 B
Swift
18 lines
293 B
Swift
//
|
|
// WebMessageEncoder.swift
|
|
// cimsdk
|
|
//
|
|
// Created by FeiYu on 2021/9/27.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class WebMessageEncoder {
|
|
|
|
func encoder(_ msg: Transportable) -> Data {
|
|
var data = Data(msg.type.bytes)
|
|
data.append(contentsOf: msg.body)
|
|
return data
|
|
}
|
|
}
|