Commit a7857f14 authored by Him188's avatar Him188

Remove `inline` modifier

parent 147254ce
......@@ -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)
......
......@@ -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
}
\ No newline at end of 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment