App Server
class AppServer(appContext: Context, httpClient: OkHttpClient, mLogger: MNetLogger, name: String, port: Int = 0, val localVirtualAddr: InetAddress, receiveDir: File, json: Json, db: MeshDatabase, val di: DI, userRepository: UserRepository) : NanoHTTPD, Closeable, DIAware
Constructors
Link copied to clipboard
constructor(appContext: Context, httpClient: OkHttpClient, mLogger: MNetLogger, name: String, port: Int = 0, localVirtualAddr: InetAddress, receiveDir: File, json: Json, db: MeshDatabase, di: DI, userRepository: UserRepository)
Types
Link copied to clipboard
@Serializable
Link copied to clipboard
data class OutgoingTransferInfo(val id: Int, val name: String, val uri: Uri, val toHost: InetAddress, val status: AppServer.Status = Status.PENDING, val size: Int, val transferred: Int = 0)
Link copied to clipboard
Properties
Functions
Link copied to clipboard
fun acceptIncomingTransfer(transfer: AppServer.IncomingTransferInfo, destFile: File, fromPort: Int = DEFAULT_PORT)
Link copied to clipboard
fun addOutgoingTransfer(uri: Uri, toNode: InetAddress, toPort: Int = DEFAULT_PORT): AppServer.OutgoingTransferInfo
Link copied to clipboard
Checks if a device is reachable at the application level This performs a lightweight check without doing a full user info exchange
Link copied to clipboard
Link copied to clipboard
open fun makeSecure(sslServerSocketFactory: SSLServerSocketFactory?, sslProtocols: Array<out String?>?)
Link copied to clipboard
Link copied to clipboard
suspend fun onDeclineIncomingTransfer(transfer: AppServer.IncomingTransferInfo, fromPort: Int = DEFAULT_PORT)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun sendChatMessageWithStatus(address: InetAddress, time: Long, message: String, f: URI?): Boolean
Send a chat message and return delivery status
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard