Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Extollite committed Sep 20, 2020
0 parents commit 8842d20
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
90 changes: 90 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 79 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"object": {
"pins": [
{
"package": "DataCompression",
"repositoryURL": "https://github.com/mw99/DataCompression.git",
"state": {
"branch": null,
"revision": "6abb8f3cd0e4b2a33b4927a7a92b6764528f2440",
"version": "3.6.0"
}
},
{
"package": "JWTDecode",
"repositoryURL": "https://github.com/auth0/JWTDecode.swift.git",
"state": {
"branch": null,
"revision": "7875753f26400a9456e3305ba47255d7629a8a69",
"version": "2.4.1"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble",
"state": {
"branch": null,
"revision": "7a46a5fc86cb917f69e3daf79fcb045283d8f008",
"version": "8.1.2"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick",
"state": {
"branch": null,
"revision": "09b3becb37cb2163919a3842a4c5fa6ec7130792",
"version": "2.2.1"
}
},
{
"package": "swift-nio",
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "96db8838be60fcbb993fa738e1120fb7f4b99c43",
"version": "2.22.1"
}
},
{
"package": "swift-raknet",
"repositoryURL": "https://github.com/Extollite/swift-raknet.git",
"state": {
"branch": "master",
"revision": "1bec70f38856f1e8b9f814826d513942cc253460",
"version": null
}
},
{
"package": "swift-transferpe",
"repositoryURL": "https://github.com/Extollite/swift-transferpe.git",
"state": {
"branch": "master",
"revision": "b872a1a298a20107a44ca2ce2453b35edf24ba45",
"version": null
}
},
{
"package": "SwiftyJSON",
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON.git",
"state": {
"branch": null,
"revision": "2b6054efa051565954e1d2b9da831680026cd768",
"version": "4.3.0"
}
}
]
},
"version": 1
}
25 changes: 25 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "TransferApp",
platforms: [
.macOS(.v10_11),
.iOS(.v9),
],
dependencies: [
.package(url: "https://github.com/Extollite/swift-transferpe.git",
.branch("master")),
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "TransferApp",
dependencies: [.product(name: "TransferPe", package: "swift-transferpe")]),
]
)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# TransferApp

26 changes: 26 additions & 0 deletions Sources/TransferApp/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import Foundation
import TransferPe

let arguments: [String] = Array(CommandLine.arguments.dropFirst())

var ip = "mcpe.to"
var port = 19132

if(arguments.count == 1){
ip = arguments[0]
} else if arguments.count == 2{
ip = arguments[0]
port = Int(arguments[1])!
}

let server = TransferPe(ip, port)
let closeFuture = server.run()

signal(SIGINT) { s in server.close() }

do {
try closeFuture!.wait()
} catch {
print(error)
}

0 comments on commit 8842d20

Please sign in to comment.