Remove inline modifier

This commit is contained in:
Him188 2020-02-07 12:30:26 +08:00
parent 147254cecd
commit a7857f147d
3 changed files with 9 additions and 9 deletions

View File

@ -30,7 +30,7 @@ actual class PlatformSocket : Closeable {
@PublishedApi
internal lateinit var readChannel: BufferedInputStream
actual suspend inline fun send(packet: ByteArray, offset: Int, length: Int) {
actual suspend fun send(packet: ByteArray, offset: Int, length: Int) {
withContext(Dispatchers.IO) {
writeChannel.write(packet, offset, length)
writeChannel.flush()
@ -40,7 +40,7 @@ actual class PlatformSocket : Closeable {
/**
* @throws SendPacketInternalException
*/
actual suspend inline fun send(packet: ByteReadPacket) {
actual suspend fun send(packet: ByteReadPacket) {
withContext(Dispatchers.IO) {
try {
writeChannel.writePacket(packet)
@ -54,7 +54,7 @@ actual class PlatformSocket : Closeable {
/**
* @throws ReadPacketInternalException
*/
actual suspend inline fun read(): ByteReadPacket {
actual suspend fun read(): ByteReadPacket {
return withContext(Dispatchers.IO) {
try {
readChannel.readPacketAtMost(Long.MAX_VALUE)

View File

@ -15,17 +15,17 @@ expect class PlatformSocket() : Closeable {
/**
* @throws SendPacketInternalException
*/
suspend inline fun send(packet: ByteArray, offset: Int = 0, length: Int = packet.size - offset)
suspend fun send(packet: ByteArray, offset: Int = 0, length: Int = packet.size - offset)
/**
* @throws SendPacketInternalException
*/
suspend inline fun send(packet: ByteReadPacket)
suspend fun send(packet: ByteReadPacket)
/**
* @throws ReadPacketInternalException
*/
suspend inline fun read(): ByteReadPacket
suspend fun read(): ByteReadPacket
val isOpen: Boolean
}

View File

@ -34,7 +34,7 @@ actual class PlatformSocket : Closeable {
@PublishedApi
internal lateinit var readChannel: BufferedInputStream
actual suspend inline fun send(packet: ByteArray, offset: Int, length: Int) {
actual suspend fun send(packet: ByteArray, offset: Int, length: Int) {
withContext(Dispatchers.IO) {
writeChannel.write(packet, offset, length)
writeChannel.flush()
@ -44,7 +44,7 @@ actual class PlatformSocket : Closeable {
/**
* @throws SendPacketInternalException
*/
actual suspend inline fun send(packet: ByteReadPacket) {
actual suspend fun send(packet: ByteReadPacket) {
withContext(Dispatchers.IO) {
try {
writeChannel.writePacket(packet)
@ -58,7 +58,7 @@ actual class PlatformSocket : Closeable {
/**
* @throws ReadPacketInternalException
*/
actual suspend inline fun read(): ByteReadPacket {
actual suspend fun read(): ByteReadPacket {
return withContext(Dispatchers.IO) {
try {
readChannel.readPacketAtMost(Long.MAX_VALUE)