接收channelIdle超过预期(Netty套接字服务器)(Receiving channelIdle more than expected (Netty Socket Server))
我在我的多人游戏Java服务器上遇到问题,我收到的信息超过预期的channelIdle事件。 它开始于2天前,我没有更改源代码和服务器配置。 可能是什么原因造成的? 在特定的时间间隔内,许多人立即从空闲事件中退出服务器。 我正在使用netty。
谢谢您的帮助。
I am facing a problem at my multiplayer java server where I am receiving more than expected channelIdle events. It started 2 days ago where I didn't change the source code and server configuration. What can be the cause for this? Between specific intervals, many people are dropping out of server instantly from idle event. I am using netty.
Thanks for the help.
原文:https://stackoverflow.com/questions/13729045
最满意答案
在这里使用库:
https://github.com/Rhinofly/play-s3
你应该可以做这样的事情:
import concurrent.ExecutionContext.Implicits._ val bucket = S3("bucketName") val result = bucket.list result.map { case Left(error) => throw new Exception("Error: " + x) case Right(list) => list.foreach { case BucketItem(name, isVirtual) => //... } }
您必须稍微调整一下您的凭据,但示例显示了如何执行此操作。
Using the library here:
https://github.com/Rhinofly/play-s3
You should be able to do something like this:
import concurrent.ExecutionContext.Implicits._ val bucket = S3("bucketName") val result = bucket.list result.map { case Left(error) => throw new Exception("Error: " + x) case Right(list) => list.foreach { case BucketItem(name, isVirtual) => //... } }
You'll have to tweak this a bit in regards to your credentials, but the examples show how to do that.
相关问答
更多-
您可以使用s3cmd http://s3tools.org/s3cmd-howto ,为了在python中使用它,您需要使用os.system或os.subprocess 用s3cmd ls再次列出你的桶 ~$ s3cmd ls 2007-01-19 01:41 s3://logix.cz-test 将文件上传到存储桶中 ~$ s3cmd put addressbook.xml s3://logix.cz-test/addrbook.xml File 'addressbook.x ...
-
在此命令中,文件(或对象)在AWS网络中的两个S3存储桶之间进行同步,并且在此过程中不会复制到本地计算机。 In this command, files (or objects) are being synchronized between two S3 buckets across AWS network and do not get copied to your local machine during the process.
-
在S3上列出文件(List files on S3)[2022-02-19]
在这里使用库: https://github.com/Rhinofly/play-s3 你应该可以做这样的事情: import concurrent.ExecutionContext.Implicits._ val bucket = S3("bucketName") val result = bucket.list result.map { case Left(error) => throw new Exception("Error: " + x) case Right(list) => ... -
从s3提供文件(serving files from s3)[2022-09-01]
如果我理解正确,您可能会遇到跨域加载问题(crossdomain.xml)。 请参阅此链接以获得有关如何解决此问题的详细解答: 为Amazon S3编写Flash crossdomain.xml If I understand things correctly you might have an issue with crossdomain loading (crossdomain.xml). Please see this link for an elaborate answer on how to so ... -
我的问题解决了 s3client.list({ "prefix": "folder_1/" + filePrefix }, function (err, data) { /* `data` will look roughly like: { Prefix: 'my-prefix', IsTruncated: true, MaxKeys: 1000, Contents: [ { Key: 'whatever' LastModif ...
-
您可以简单地迭代bucket objects并使用with_prefix方法 s3.buckets[YOUR BUCKET NAME].objects.with_prefix('videos/my_videos/college').each.collect(&:key) #=> ["videos/my_videos/college/myfirst_day.mp4"] 或使用as_tree方法 s3.buckets[YOUR BUCKET NAME].as_tree(prefix:'videos/my_vi ...
-
如何在不列出存储桶的情况下将文件上传到Amazon S3(How I can upload files to Amazon S3 without listing bucket)[2022-07-09]
{ "Version": "2008-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": [ "s3:GetObject", " ... -
如何使用Amazon s3路径在java中列出amazon s3文件夹(How to use Amazon s3 path for listing amazon s3 folders in java)[2023-06-06]
AWS Java-SDK文档包含可用于此目的的API详细信息: 提供在“foreach”语句中迭代Amazon S3对象的简便方法。 例如: for ( S3ObjectSummary summary : S3Objects.withPrefix(s3, "my-bucket", "photos/") ) { System.out.printf("Object with key '%s'\n", summary.getKey()); } S3ObjectSummarys列表将被拉伸,一次一页,因为 ... -
安装AWS CLI工具 ,然后使用aws s3 cp命令或aws s3 sync命令将所有文件上载到S3。 或者,您可以考虑使用第三方S3客户端,例如Cyberduck和CloudBerry Explorer 。 Install the AWS CLI tool, then use the aws s3 cp command or the aws s3 sync command to upload all your files to S3. Alternatively you could look into ...
-
在桶名称之前不应该有斜杠,可以在文件路径上使用斜杠 There shouldn't be a slash before the bucket name, its OK to have slash on the file path